Main Content
ans
Most recent answer
Syntax
Description
ans
is the variable created when an output is returned without a
specified output argument. MATLAB® creates the ans
variable and stores the output there.
Changing or using the value of ans
in a script or function is not
recommended, as the value can change frequently.
ans
is specific to the current workspace. The base workspace and
each function workspace can have its own instance of ans
. For more
information, see Base and Function Workspaces.
Examples
Version History
Introduced before R2006a