Problem in ezplot with simple equation

조회 수: 15 (최근 30일)
Camilo Sánchez
Camilo Sánchez 2018년 4월 23일
댓글: Star Strider 2018년 4월 23일
s=dsolve ('Dy=(t+y)^(1/2)','y(0.4)=0.41')
ezplot(s,[0.4,10])
Whats wrong???

채택된 답변

Star Strider
Star Strider 2018년 4월 23일
Not all differential equations have analytical solutions. Fortunately, ode45 will integrate this without problems:
DE = @(t,y) (t+y)^(1/2);
[T,Y]= ode45(DE, [0.4 10], 0.41);
figure(1)
plot(T,Y)
grid
  댓글 수: 2
Camilo Sánchez
Camilo Sánchez 2018년 4월 23일
Thanks
Star Strider
Star Strider 2018년 4월 23일
As always, my pleasure.

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by