using a loop within a loop in matlab
1 次查看(过去 30 天)
显示 更早的评论
Dear all,
I have this problem
T=1000
for ii=1:T
for t=ii:T
'here a have a function that depends on t'
end
end
If I try to run this code I get an error that 'ii' is not recognised within the second loop. Is there a way to avoid this?
Best
2 个评论
Adam Danz
2020-5-29
Please provide the entire copy-pasted error message.
It may be helpful to know what release of matlab you're using.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!