Saving loop entries and plotting T vs r
Mostra commenti meno recenti
I am trying to set up the loop to run the calculation as well as save the output that way i can plot it in a graph.
clc
clear
y=0.5; %magnitude of base motion
zeta=1; %damping ratio
wb=35; %base frequency
k=4220000; %stiffness
for m=[13236 21523 5750000 10000000] %<===input mass%
wn=sqrt(k/m)
r=wb/wn
x=y*sqrt(((1+(2*zeta*r)^2)/(((1-r^2)^2)+((2*zeta*r)^2))))
T=x/y
end
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su 2-D and 3-D Plots 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!