Problem in ezplot with simple equation
1 view (last 30 days)
Show older comments
Camilo Sánchez
on 23 Apr 2018
Commented: Star Strider
on 23 Apr 2018
s=dsolve ('Dy=(t+y)^(1/2)','y(0.4)=0.41')
ezplot(s,[0.4,10])
Whats wrong???
0 Comments
Accepted Answer
Star Strider
on 23 Apr 2018
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 Comments
More Answers (0)
See Also
Categories
Find more on Particle & Nuclear Physics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!