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!