Reputation: 543
I have local functions in my main matlab script for example:
Exercise.m
[output 1, output2] = Function1(input);
... and so on
When I run Exercise.m script. I see only the variables of Exercise.m. But I want to see also the variables of Function1.m file. Therefore I go into Function1.m file and run it. But now I'm getting error "not enough input arguments".
What should I do to see variables of my other functions?
Upvotes: 0
Views: 59
Reputation: 26069
Several options:
for example, you can put a breakpoint somewhere at the end of the function, when you'll run the script it will stop at the breakpoint showing you only the local memory of the function. You can then press continue, and exit the function and the rest of the code ill run.
avoid using functions, have one big script (dont)
use global \ persistent variable for only the variables you care about that takes place inside the functions. (not very recommended)
Upvotes: 1