Solving System of ODEs using MATLAB
이전 댓글 표시
Hi,
I am trying to solve a system of two ODEs shown as follow:

However, there is no symbolic solution to this system.
May I know how should I proceed to solve the system and plot the graph X vs W?
Hoping for useful solutions. Thanks in advance.
답변 (1개)
Sam Chak
2022년 6월 11일
Hi Teo, Do something like this:
odefcn = @(t, y) [y(2);...
0.1*sin(t) - 10*y(1) - 2*sqrt(10)*y(2)];
tspan = (0:0.01:20)';
ic = [1 0];
[t, y] = ode45(odefcn, tspan, ic);
plot(t, y(:, 1), 'linewidth', 1.5);
grid on;
xlabel('t');
ylabel('y(t)')
카테고리
도움말 센터 및 File Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!