Quicky. re 'whos' and workspace.

1 visualización (últimos 30 días)
Scragmore
Scragmore el 27 de Dic. de 2011
Hi,
What is the location/path of the workspace or how do I 'whos' my workspace from within a function.
If I from within a function...
x = whos;
I get a list of variables/arrays declared within function.
x = whos('global');
I get variables/arrays declared globally.
What I want is same result as if I ran 'whos' from the command prompt, ie my workspace
>>x = whos;
Thanks, happy holiday, Christmas or drinking.
Regards,
AD

Respuesta aceptada

Fangjun Jiang
Fangjun Jiang el 27 de Dic. de 2011
x=evalin('base','whos')

Más respuestas (2)

Honglei Chen
Honglei Chen el 27 de Dic. de 2011
You could try evalin
doc evalin

Daniel Shub
Daniel Shub el 28 de Dic. de 2011
I am not sure why you want to do whos in the base or caller workspace, but my guess is that you might want something like
doc inputname

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by