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
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?
回答(1 个)
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!
2 个评论
sixwwwwww
2013-10-27
No t_sym is a symbol to represent time in the equation. Is time is a matrix? and what is the size of this matrix?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!