Hi,
I'm a novice in matlab.
I encounterd two problems while trying to define a function.
First, the input variable that is a single number cannot be recognised as numeric in the function statements.
Second, I don't know why the input variable will be cleared in a loop…like the below loop…in this settings, I tried to define a function that looks like [output1 output2]=function(*****,A,****). However, while calling this function, it will report error that "reference to a cleared variable A" in the second iteration for the loop (marked by red circle)…
Wish somebody could help me to solve these two confusing problems!
Best Answer