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

1 visualización (últimos 30 días)
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

Respuesta aceptada

Torsten
Torsten el 9 de Mzo. de 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;

Más respuestas (0)

Categorías

Más información sobre Structures en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by