Error when using ezplot

8 visualizzazioni (ultimi 30 giorni)
kairui wang
kairui wang il 16 Mar 2019
Commentato: madhan ravi il 16 Mar 2019
Hey, I'm trying to use ezplot to draw a plot with symbolic relations as follows:
and should draw with the range as following shows:
my code goes like follows:
syms x y t
x = 3*t/(1+t^3);
y = 3*t^2/(1+t^3);
a = x^3 + y^3 == 3*x*y
figure()
ezplot(a,[-2, 2, -3, 2])
but I got following erros:
Error using sym/ezplot>fhandle (line 115)
Two variables expected when plotting an equation.
Error in sym/ezplot (line 78)
h = ezplot(fhandle(f),varargin{:});%#ok<EZPLT>
Error in test10 (line 13)
ezplot(a,[-2, 2, -3, 2])
what's wrong with the code?

Risposta accettata

Stephan
Stephan il 16 Mar 2019
syms a(x,y)
a = x^3 + y^3 - 3*x*y == 0;
ezplot(lhs(a),[-2, 2, -3, 2])
  2 Commenti
kairui wang
kairui wang il 16 Mar 2019
Thanks. You reminds me that I don't need to care about t.
madhan ravi
madhan ravi il 16 Mar 2019
thought of it too but the relationship with t makes it confusing [t = -1 doesn't belong to the domain]

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange

Tag

Prodotti


Release

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by