saving workspace variables individually?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Dave
el 27 de Mzo. de 2023
Comentada: Les Beckham
el 27 de Mzo. de 2023
Hello
Is there a way to save the variables in the workspace separately?
Say the workspace contains 50 variables (all arrays of double) , is there a way to save those 50 variables separately instead of saving them in one mat file?
0 comentarios
Respuesta aceptada
Les Beckham
el 27 de Mzo. de 2023
a = 1;
b = 2;
c = 3;
vars = who
for v = 1:numel(vars)
save(sprintf('%s.mat', vars{v}), vars{v})
end
dir
2 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre File Operations 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!