Info
此问题已关闭。 请重新打开它进行编辑或回答。
Using ODE45 for coupled differential equations
2 次查看(过去 30 天)
显示 更早的评论
How can I solve for the
's in the system of differential equations?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/222233/image.png)
I have:
m1 = 12; m2 = 24; K1 = 6000; K2 = 3450; B1 = 40; B2 = 28; F = 5;
My equations are:
The script below currently utilizes IC's for x and time.
m1 = 12; m2 = 24; K1 = 6000; K2 = 3450; B1 = 40; B2 = 28; F = 5;
ODE=@(t,x)([x(2); (1/m1)*(F-B1*x(2)+B1*x(4)+K1*x(3)); x(4);...
(1/m2)*(-(B1+B2)*x(4)+B1*x(2)-(K1+K2)*x(3)+K1*x(1))]);
ts = [0, 1]; % Time space
ICs = [0; 0; 0; 0]; % Initial Conditions
[t, x]=ode45(ODE, ts, ICs, []);
plot(t, x(:,1), 'b', t, x(:,2), 'r', t, x(:,3), 'g', t, x(:,4), 'k')
However, I want to solve this system of equations with the initial condition solely being a frequency range.
FREQ = 0:1000 % Hz
m1 = 12; m2 = 24; K1 = 6000; K2 = 3450; B1 = 40; B2 = 28; F = 5 * (-1i * 2*pi * FREQ);
How can I accomplish this?
0 个评论
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!