Data saving, data import cell

1 Ansicht (letzte 30 Tage)
NERTILA OGRENI
NERTILA OGRENI am 28 Apr. 2021
Kommentiert: Mathieu NOE am 28 Apr. 2021
I have a saved cell 12x12x12 in a file, which I want to recall into another file for some calculation.
How can I read the matrixes of the cell i have in the new file?
  1 Kommentar
Mathieu NOE
Mathieu NOE am 28 Apr. 2021
hello
you can save and then load the cell in its original format , like here (created A , saved it and reloaded it afetr clearing my workspace)
A = rand(3,3,3)
A(:,:,1) =
0.8147 0.9134 0.2785
0.9058 0.6324 0.5469
0.1270 0.0975 0.9575
A(:,:,2) =
0.9649 0.9572 0.1419
0.1576 0.4854 0.4218
0.9706 0.8003 0.9157
A(:,:,3) =
0.7922 0.0357 0.6787
0.9595 0.8491 0.7577
0.6557 0.9340 0.7431
>> save AA.mat A
>> clearvars
>> load AA.mat
>> A
A(:,:,1) =
0.8147 0.9134 0.2785
0.9058 0.6324 0.5469
0.1270 0.0975 0.9575
A(:,:,2) =
0.9649 0.9572 0.1419
0.1576 0.4854 0.4218
0.9706 0.8003 0.9157
A(:,:,3) =
0.7922 0.0357 0.6787
0.9595 0.8491 0.7577
0.6557 0.9340 0.7431

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by