Solve the differential equation numerically using matlab
이전 댓글 표시
답변 (1개)
Torsten
2015년 8월 31일
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
Ahamed Zajith
2015년 8월 31일
편집: Ahamed Zajith
2015년 8월 31일
Walter Roberson
2015년 8월 31일
That is the beginner version.
Are you asking for the "beginner" version, or are you asking for the homework version in which you need to calculate it without using the ode functions?
Ahamed Zajith
2015년 8월 31일
Walter Roberson
2015년 8월 31일
If you have the symbolic toolbox then
dsolve('Dy=2*x*y', 'x')
Ahamed Zajith
2015년 8월 31일
Torsten
2015년 8월 31일
... but this is not a numerical solution.
Best wishes
Torsten.
Walter Roberson
2015년 8월 31일
For some reason what runs through my mind is the classic, "So nail it to a wall then."
카테고리
도움말 센터 및 File Exchange에서 Mathematics에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!