new to Matlab --- how do I enter a matrix summation to find the time response of vibration

1 次查看(过去 30 天)
Equation of motion of a 2 DOF system:
x(t)=(sum from i=1-n of) Ai Xi cos(wi t) + Bi Xi sin(wi t)
Ai = dot(u,Xi)/dot(Xi,Xi) Bi = dot(v,Xi)/dot(wi Xi,Xi)
Xi = [1,0.78;0.78,-1] wi = [1.78,0; 0,-0.28] u=[1,0] v=[0,0]
I want to find x(t). How do I enter this into Matlab?
  2 个评论
sixwwwwww
sixwwwwww 2013-10-26
Dear Todd, Xi is a 2x2 matrix however u is a 1x2 vectorx. So how can you take dot product of these two?
Todd Nelson
Todd Nelson 2013-10-27
I see your point. I'll look into it further. Assume u=[1,0;0,0] v=[0,0;0,0]
What command(s) do I use in Matlab to get the sum from i=1-n? Can I get a time sequence of the motion from matrix equations?
Thanks in advance.

请先登录,再进行评论。

回答(1 个)

sixwwwwww
sixwwwwww 2013-10-27
Dear Todd, one way to do is as follows:
syms t_sym
u = [1, 0; 0, 0];
v = [0, 0; 0, 0];
Xi = [1, 0.78; 0.78, -1];
wi = [1.78, 0; 0, -0.28];
Ai = dot(u, Xi) / dot(Xi, Xi);
Bi = dot(v, Xi) / dot(wi, Xi);
x_sym = Ai * Xi * cos(wi * t_sym) + Bi * Xi * sin(wi * t_sym);
t = 1:100;
x11 = double(subs(x_sym(1, 1), t_sym, t));
x12 = double(subs(x_sym(1, 2), t_sym, t));
x21 = double(subs(x_sym(2, 1), t_sym, t));
x22 = double(subs(x_sym(2, 2), t_sym, t));
plot(t, x11, t, x12, t, x21, t, x22), legend('x11', 'x12', 'x21', 'x22')
I hope it helps you somehow. Good luck!

类别

Help CenterFile Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by