ans
Returns the most recently computed result that was not assigned to a variable.
Syntax
ans
Outputs
- ans
- The most recently computed result that was not assigned to a variable. If no results have been computed, nothing is returned.
Examples
Simple
example:
1+2;
ans
ans=3
Assignment
example:
1+2;
c = sqrt(5); % assigned to a variable so ans does not change
ans
ans=3