How do I evaluate a previous expression?

resolvent's picture

I just typed an expression, such as

expand((z-6+I)*((5-I)*z+9));

on a line. On the next line, I wish to evaluate this expression at at z = 4+I, say,

without having to retype the expression. How do I do this?

%

simply returns the previous line.

use eval

In the Standard gui you can right click on the expression and select "Evaluate at a point" from the drop-down menu, then fill in 4+I.  Or you could type

eval(%,z=4+I);

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}