Error when using ezplot

조회 수: 1 (최근 30일)
kairui wang
kairui wang 2019년 3월 16일
댓글: madhan ravi 2019년 3월 16일
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?

채택된 답변

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

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

태그

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by