필터 지우기
필터 지우기

how to plot symbolic equations

조회 수: 1 (최근 30일)
safisay
safisay 2017년 10월 18일
편집: Walter Roberson 2017년 10월 23일
Hi,
I was trying to plot symbolic ode equations. my code is
syms r Z_r w_r t i_L
syms n V_in V_o v_c
r=n*V_in-(V_o/2);
i_L=(r/Z_r)*sin(pi-w_r*t);
v_c=n*V_in+r*cos(pi-w_r*t);
y=Z_r*i_L;
fplot(v_c,y)
but it is giving me this error
Error using fcnchk (line 106)
If FUN is a MATLAB object, it must have an feval method.
Error in fplot (line 62)
fun = fcnchk(fun);
Error in Untitled (line 8)
fplot(v_c,y)
Can anyone please help?
  댓글 수: 4
safisay
safisay 2017년 10월 18일
yes!! I know that..but is it possible to plot with these variables?
Walter Roberson
Walter Roberson 2017년 10월 18일
fplot() does accept pairs of functions, but the functions must only involve one variable. You appear to be using an older MATLAB release; in current releases the error for the first version would be,
Error using fplot>singleFplot (line 236)
Input must be a function or functions of a single variable.

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

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by