save matrix....load matrix

256 visualizaciones (últimos 30 días)
Andrew
Andrew el 28 de En. de 2014
Comentada: Andrew el 28 de En. de 2014
A =
2 3 4
5 6 7
8 8 9
how can i save the matrix A to a file (txt or mat)? And then load it and have
C=...something...
and in matlab it will appear
C =
2 3 4
5 6 7
8 8 9
thank you...

Respuesta aceptada

Amit
Amit el 28 de En. de 2014
You can save the variable as a mat file using something like this:
save('saveA.mat','A');
To do the second step, you can create a matfile object like;
example = matfile('saveA.mat');
C = example.A;

Más respuestas (1)

Mischa Kim
Mischa Kim el 28 de En. de 2014
Editada: Mischa Kim el 28 de En. de 2014
Use
save('A.mat','A')
and the corresponding load.

Categorías

Más información sobre Logical 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