error: elobrate on it
Mostra commenti meno recenti
% Optimization of Tuned mass damper parameters
wn = input('natural frequency of main system, wn:');
z = input('damping factor,z:');
ms = input('mass of main system, ms:');
md = input('mass of damper system, md:');
% Tuned damper parameters
kd = input('Stiffness of damper, kd:');
zd = input('damping factor, zd:');
wd = kd/md;
w = 0:1:1000;
% Non-dimensional parameters
r = w/wn;
rd = wd/wn;
m = ms/md; % Fixed for a setup
for s=1: length(r)
G(s,:)= sqrt((rd.^2-r.^2).^2+4*zd.^2*rd.^2*r.^2)./{((1-r.^2)*(rd.^2-r.^2)-m*rd.^2*r.^2-4*z*zd*rd*r.^2).^2+4*(zd*rd*r*(1-r.^2-m*r.^2)+z*r*(rd.^2-r.^2)).^2}.^(1/2);
Re(s,:) = {(rd.^2 -r.^2)*(1-r.^2)*(rd.^2-r.^2)-m*rd.^2*r.^2+ 4*(zd.^2*rd.^2*r.^2*(1-r.^2-m*r.^2))}./{((1-r.^2)*(rd.^2-r.^2)-m*rd.^2*r.^2-4*z*zd*rd*r.^2).^2+4*(zd*rd*r*(1-r.^2-m*r.^2)+z*r*(rd.^2-r.^2)).^2}.^(1/2);
end
figure (1)
plot(r,G)
xlabel ('\omega/\omega_n')
ylabel ('|x (i\omega)|/F')
grid
figure (2)
plot(r, Re)
xlabel ('\omega/\omega_n')
ylabel ('Non-dimensional real part (Re)')
grid
error:
Error using *
Inner matrix dimensions must agree.
Error in two_dof (line 16)G(s,:) = sqrt((rd.^2-r.^2).^2+4*zd.^2*rd.^2*r.^2)./{((1-r.^2)*(rd.^2-r.^2)-m*rd.^2*r.^2-4*z*zd*rd*r.^2).^2+4*(zd*rd*r*(1-r.^2-m*r.^2)+z*r*(rd.^2-r.^2)).^2}.^(1/2);
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Computational Geometry in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!