Your error is caused by trying to replace x+1
with y1
. ezplot
requires that symbolic expressions are functions of only 2 symbolic variables. However, there are 3 symbolic variables (x
, y
, and y1
) in your call to ezplot
:
ezplot('y^2+x*y+x*y^3+y1');
If you use your original equation, everything should work fine:
ezplot('y^2+x*y+x*y^3+x+1');
EDIT: In case you were curious...
If you want to plot an equation with 3 variables, you will first need to solve the equation for one of them and then use the function ezsurf
(this is illustrated in this answer I gave to another SO question). Technically, y1
is a dependent variable the way you have defined it (since it depends on the variable x
). However, for the sake of the following example, let's assume it's an independent variable. The equation:
y^2 + x*y + x*y^3 + y1 = 0
would be solved for y1
to get the following:
y1 = -y^2 - x*y - x*y^3
and y1
would be plotted in the following way:
ezsurf('-y^2-x*y-x*y^3');
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…