Trying to make a variable change between time intervals then output an array to plot the change of force

1 visualizzazione (ultimi 30 giorni)
L=100;
t=1:0.2:300;
while t<100
Mw=20
while t>100 and t<200
Mw=100
while t>200
Mw=17
end
end
end
F=0.04*L*Mw

Risposta accettata

Torsten
Torsten il 9 Mar 2022
L=100;
t=1:0.2:300;
Mw = zeros(numel(t),1);
Mw(t<100) = 20;
Mw(t>=100 & t<=200)=100;
Mw(t>200) = 17;
F=0.04*L*Mw;

Più risposte (0)

Categorie

Scopri di più su Structures in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by