フィルターのクリア

How to solve a second order ODE with variable coefficients with an excitation.

1 回表示 (過去 30 日間)
Enterprixe
Enterprixe 2017 年 2 月 28 日
編集済み: Enterprixe 2017 年 3 月 1 日
Hello, after knowing how to solve an homogeneous 2nd order ODE i was wondering how to solve the same problem just adding and armonic excitation. I would also like to have it solved using the symbolic math toolbox. The problem will be like the following:
y'' + sen(10*t)y' + 5y = p(t)
p(t) = sen( 0.5*t + 2*t^2)
y(0)= 0
y'(0)= 1
  2 件のコメント
Jan
Jan 2017 年 2 月 28 日
What have you tried so far?
Enterprixe
Enterprixe 2017 年 3 月 1 日
編集済み: Enterprixe 2017 年 3 月 1 日
i try this
syms t y(t) Y
D1y = diff(y,t);
D2y = diff(y,t,2);
Eqn = D2y + [-0.11674*(1-exp(-10*t)) + 0.5351*(1-cos(10*t))]*D1y + 3.2137*y == 0.2029*sin((0.89634+0.8102476*t)*t);
yode = odeToVectorField(Eqn);
Yodefcn = matlabFunction(yode, 'Vars',[t Y]);
% Yodefcn = @(t,Y) [Y(2);-exp(t.*-1.0e1)-sin(t.*1.0e1).*Y(2)-Y(1)];
tspan = [0:0.0254:50];
Y0 = [0 1.8989];
[T,Y] = ode45(Yodefcn, tspan, Y0);
plot(T, Y(:,1))
ylabel('coordenada 1')
xlabel('tiempo')
grid
but the problem is that the solution is almost equal to the homogeneous one( without the sin at the right side of the equation) and that makes me doubt im making things right. Also it would be nice how to program the excitation to a p(t) which after solving the equations gives me the values of it for each time.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by