Reading data from cell array

1 Ansicht (letzte 30 Tage)
Ahmad Hasnain
Ahmad Hasnain am 24 Apr. 2019
Kommentiert: Ahmad Hasnain am 24 Apr. 2019
I have a cell array that contains all the data. A{1,1}, A{2,1},...A{37,1}.
Now, I want to extract the first row from A{1,1}, A{2,1},...A{37,1} and then combine all the 37 rows in one mat file. How can I do that?
  2 Kommentare
KSSV
KSSV am 24 Apr. 2019
Is all cells of same size?
Ahmad Hasnain
Ahmad Hasnain am 24 Apr. 2019
Yes, they are all of the same size 15x38

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

madhan ravi
madhan ravi am 24 Apr. 2019
Bearbeitet: madhan ravi am 24 Apr. 2019
C = cell2mat(cellfun(@(x) x(1,:), A, 'un',0));
save mymat.mat C

Weitere Antworten (0)

Kategorien

Mehr zu Data Types finden Sie in Help Center und File Exchange

Produkte


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by