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

1 view (last 30 days)
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 Comments
sixwwwwww
sixwwwwww on 26 Oct 2013
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 on 27 Oct 2013
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.

Sign in to comment.

Answers (1)

sixwwwwww
sixwwwwww on 27 Oct 2013
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!

Categories

Find more on Vibration Analysis in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!