Trying to make a variable change between time intervals then output an array to plot the change of force
1 view (last 30 days)
Show older comments
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
0 Comments
Accepted Answer
Torsten
on 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;
More Answers (0)
See Also
Categories
Find more on Structures in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!