How to include a conditional function inside a "for k = 1 : 200" loop?
Mostra commenti meno recenti
I am trying to contain a function inside a loop as mentioned. The loop is "for k = 1 : ite" where ite=200. The function I am calling contains conditional statements such as "if k == 1," and "if k > 1,". It is returning an error saying that k is undefined when running the conditional statement of the function. Do I need to load the k variable from the original code inside the function?
1 Commento
Azzi Abdelmalek
il 30 Lug 2013
Do I need to load the k variable from the original code inside the function?
Can you explain ?
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Loops and Conditional Statements in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!