MATLAB: How to call the function inside the looping function….
loopMATLAB
for e.g..
while (....)
....
.....
...
function ...=...
.....
condition
end
Best Answer
"function" as a keyword is only used for defining functions, and cannot be used inside a loop (or inside an "if" or "switch" or other control statement.)
The only kinds of functions that can be defined within loops are anonymous functions.
If you are trying tocall a function that you have previously defined, do not include the "function" keyword.
Best Answer