Problem in ezplot with simple equation
1 次查看(过去 30 天)
显示 更早的评论
s=dsolve ('Dy=(t+y)^(1/2)','y(0.4)=0.41')
ezplot(s,[0.4,10])
Whats wrong???
0 个评论
采纳的回答
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
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Particle & Nuclear Physics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!