Save a matrix in MATLAB
233 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have a 100x100 matrix in MATLAB and I want to save it in matlab format. Is there a way to do so in MATLAB?
0 comentarios
Respuesta aceptada
Adam
el 4 de Nov. de 2015
Editada: Adam
el 25 de Jun. de 2018
save( filename, 'matrixName' )
e.g.
myMatrix = rand( 100, 100 );
filename = 'C:\Stuff\Somefile.mat';
save( filename, 'myMatrix' );
Be sure to use the .mat extension for your file.
6 comentarios
Luthando Maqondo
el 24 de Jun. de 2018
This does not save the Matrix as it is, it stored a struct version of if and now I can't index the elements in side the matrices. Even the size(Matrix) function gives a 1x1 for a matrix expected to be 4 dimentional;
Adam
el 25 de Jun. de 2018
It works fine for me. I get the same matrix in file as I do in my workspace.
Más respuestas (0)
Ver también
Categorías
Más información sobre Data Import from MATLAB 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!