using a loop within a loop in matlab

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 commentaires

Robin Kirsch
Robin Kirsch le 29 Mai 2020
If i copy paste your code it works, i dont get the error
Adam Danz
Adam Danz le 29 Mai 2020
Please provide the entire copy-pasted error message.
It may be helpful to know what release of matlab you're using.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements dans Centre d'aide et File Exchange

Question posée :

le 29 Mai 2020

Commenté :

le 29 Mai 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by