How to get the base workspace varibles in a function
5 views (last 30 days)
Show older comments
Hey guys, the 'who' method only return the function argument. How to return the base workspace? Thank you so much`~~
0 Comments
Accepted Answer
Kaustubha Govind
on 13 Dec 2011
Do you mean that you just want to get the list of variables in the base workspace from your function? How about:
evalin('base', 'who')
3 Comments
More Answers (1)
Sean de Wolski
on 13 Dec 2011
[x y] = foo(r,s,t,u,v)
Calling from a script of the command line will pass base variables r,s,t,u,v into foo and return x,y to the base. Is this what you want? Note, foo has to be set up to take in various input arguments and return others.
0 Comments
See Also
Categories
Find more on Whos in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!