saving all of workspace in a specified folder

17 visualizaciones (últimos 30 días)
mohammad
mohammad el 17 de Sept. de 2011
Comentada: Emma_Mc el 3 de Mzo. de 2016
saving all of workspace in a specified folder and after saving, how it can be import to MATLAB (load) from that specified folder?

Respuesta aceptada

TAB
TAB el 17 de Sept. de 2011
Saving to path
save('path\myfile.mat');
Example: save('D:\WORKING\Myfile.mat');
Loading from a path
load('path\myfile.mat');
Example: load('D:\WORKING\Myfile.mat');
  6 comentarios
Daniel Garcia-Gonzalez
Daniel Garcia-Gonzalez el 29 de En. de 2016
Almost 3 years and no answer :(
Emma_Mc
Emma_Mc el 3 de Mzo. de 2016
Include the location in the string for your variable name.
For example, you want to save a and b to the mat file 'variable_a_1_variable_b_2' in a folder 'save_test'.
a=1;
b=2;
variable_name=['D:\save_here\variable_a_',num2str(a),'variable_b_',num2str(b),'.mat'];
save(variable_name,'a','b');

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Variables en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by