save variables in matlab workspace

27 visualizaciones (últimos 30 días)
satendra kumar
satendra kumar el 12 de Nov. de 2012
Comentada: Shiv Nileshkumar Matliwala el 15 de Dic. de 2022
I have a function which calls a script. There are some variables in script. I want to save them to my command window. How can i do that. Any help fellas.

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 12 de Nov. de 2012
Editada: Azzi Abdelmalek el 12 de Nov. de 2012
value=15;
assignin('base','var',value)
% 'var' is your variable name
  2 comentarios
satendra kumar
satendra kumar el 12 de Nov. de 2012
Thanks Bud :)
Shiv Nileshkumar Matliwala
Shiv Nileshkumar Matliwala el 15 de Dic. de 2022
Is there any way to load the variable directly to base workspace ? becuase Its not possible to do this
assignin('base','var')
I want to do like above.

Iniciar sesión para comentar.

Más respuestas (1)

Walter Roberson
Walter Roberson el 12 de Nov. de 2012
assignin('base', 'variablename', value)

Categorías

Más información sobre Workspace Variables and MAT-Files en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by