Error using ezplot command

조회 수: 14 (최근 30일)
Adriana Castillo Castillo
Adriana Castillo Castillo 2020년 2월 17일
댓글: Adriana Castillo Castillo 2020년 2월 22일
Hi.
I´m trying to make a graph using the command "ezplot". But I get this error message: "Index exceeds the number of array elements (1)" and "error in ezplot>ezimplicit". Would you please help me to figure out what´s wrong?
This is my code:
clear all
syms x x(t) T x_0 xT
T=2;
x_0=0;
F(t)=int(x(t)-(diff(x(t))^2),t,0,T)
D=functionalDerivative(F,x)
x_sol1= dsolve(D,x(0)==x_0, x(T)==xT)
x_sol1(t)=subs(x_sol1);
figure(1);
ezplot(x_sol1(t),0,T);

채택된 답변

Srivardhan Gadila
Srivardhan Gadila 2020년 2월 20일
The correct usage ot the function is as follows:
ezplot(x_sol1(t),[0,T]);
Please refer to the documentation of ezplot for more information.
  댓글 수: 1
Adriana Castillo Castillo
Adriana Castillo Castillo 2020년 2월 22일
Thank you so much! I did work.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Numbers and Precision에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by