How to 'who' the global workspace to a variable in a function ?
Mostrar comentarios más antiguos
Hi,
I'm trying to do a "clear all but" function, i.e. clear all variables in the workplace except those who are specified : function [ ] = clearAllBut( var1, var2 ...)
I was thinking about getting the workspace variables names in a cell with : A = who('global') but it doesn't work since the call of who is within a function and retrieves the local workspace (which is empty because it is the first thing I do in my function).
Is there a way to really retrieve the global workspace variable names ?
Thank you for your help
Léo.
Respuesta aceptada
Más respuestas (1)
José-Luis
el 12 de Nov. de 2012
0 votos
3 comentarios
Léonard Roussel
el 12 de Nov. de 2012
José-Luis
el 12 de Nov. de 2012
Or if you prefer the simpler syntax
Categorías
Más información sobre Whos en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!