trying to solve an ode using ode45

조회 수: 1 (최근 30일)
Anas Gharsa
Anas Gharsa 2022년 1월 25일
댓글: Anas Gharsa 2022년 1월 25일
I tried to solve an ode with the command ode45 and plot the result!!it works fine but it does not show the graph!!!
this is what i wrote
F = @(t,y)(y/t+1 + 5*((t+1)/(1+25*t^2)));
[t,y] = ode45 (F,[0,1],1);
plot(t,y);
  댓글 수: 1
Ankit
Ankit 2022년 1월 25일
편집: Ankit 2022년 1월 25일
this is because your y values are NaN

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

채택된 답변

Ankit
Ankit 2022년 1월 25일
you forgot to put bracket
F = @(t,y)(y/(t+1) + 5*((t+1)/(1+25*t^2)));
[t,y] = ode45 (F,[0 1],1);
plot(t,y);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by