I have a question regarding time dependent loop, as I want to have a variable changing with time in the loop from 0 to 30
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Akzeptierte Antwort
Ameer Hamza
am 9 Apr. 2020
Bearbeitet: Ameer Hamza
am 10 Apr. 2020
Without loop:
t = linspace(0,30,100); % create 100 points between 0 and 30
gamma = 4-(6/90*t);
Using for loop:
t = linspace(0,30,100);
gamma = zeros(size(t));
for i=1:numel(t)
gamma(i) = 4-(6/90*t(i));
end
10 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Geology finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!