Solve the differential equation numerically using matlab

2 views (last 30 days)
dy/dx=2xy

Answers (1)

Torsten
Torsten on 31 Aug 2015
fun=@(t,y)2*t*y;
Tspan = [0 2];
y0=1;
[T,Y] = ode45(fun,Tspan,y0);
plot(T,Y(:,1));
Best wishes
Torsten.
  7 Comments
Torsten
Torsten on 31 Aug 2015
... but this is not a numerical solution.
Best wishes
Torsten.
Walter Roberson
Walter Roberson on 31 Aug 2015
For some reason what runs through my mind is the classic, "So nail it to a wall then."

Sign in to comment.

Products

Community Treasure Hunt

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

Start Hunting!