For example, for the ellipsoid I can use with To parametrize the surface given by the equation f(x,y,z)=0, you need functions x(s,t), y(s,t) and z(s,t) so that f(x(s,t),y(s,t),z(s,t))=0. Since it is two dimensional, there will be two parameters. To plot a surface, you may want to think of the surface as parametrized.
Give the command before giving the command for the plot you want to appear in the new window. If MATLAB ignores hold off (which it does occasionally), give the command clf The first thing is to try is the command hold off before the new plot command. Preventing MATLAB from putting a new plot on top of an old one Here is the new blank (and invisible) figure.
You can get a new figure window by giving the command figure syms xĪlternatively, you can create an anonymous constant function and plot that. So, for example, to use it to plot the constant function 5, you can write 5 as 5+0*x and plot that. Solve('x^2-5*x=6') Plotting a constant function with ezplotĮzplot requires a variable in a symbolic expression. Or you can give the solve command an equation enclosed in single quotes: The command solve(x^2-5*x=-6) gives the error messageĮrror: The expression to the left of the equals sign is not a valid targetĪnd solve(x^2-5*x+6=0) gives a similar error message. Suppose you want to solve the equation x^2-5*x=6. The solve command takes as its input a symbolic expression, not an equation and assumes that the expression is equal to 0. If MATLAB doesn't recognize the quadl command, make sure that you have typed it correctly. MATLAB (and most mathematical software) knows the natural logarithm as log(x). MATLAB (and most mathematical software) knows the exponential function as exp(x) so the number e in MATLAB is exp(1). The exponential function and the number e If you have a space or hyphen, when you publish to html MATLAB will give an error message when it tries to execute the first command and won't try to execute any later commands.