clc;k=48000;m=1200;c=[3000:1000:10000];w=sqrt(k/m);E=c/(2*sqrt(m*k));a=sqrt(1-E.^2)*w;b=E/(sqrt(1-E.^2));f0=9000/100;d=E*w;t=[0:0.05:10];x=f0-f0.*exp(-d.*t).*cos(a.*t)-(f0*b).*exp(-d.*t).*sin(a.*t);plot(t,x);ylabel('Frequency of Suspension');xlabel('Time (s)');title('Frequency of Car Suspension')
MATLAB: I can’t figure out why I am getting the error message Matrix dimensions must agree.
errorMATLABmatrix
Best Answer