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 回表示 (過去 30 日間)
古いコメントを表示
gamma(t) =4-(6/90*t);
0 件のコメント
採用された回答
Ameer Hamza
2020 年 4 月 9 日
編集済み: Ameer Hamza
2020 年 4 月 10 日
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 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Geology についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!