Reading data from cell array

조회 수: 1 (최근 30일)
Ahmad Hasnain
Ahmad Hasnain 2019년 4월 24일
댓글: Ahmad Hasnain 2019년 4월 24일
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
KSSV
KSSV 2019년 4월 24일
Is all cells of same size?
Ahmad Hasnain
Ahmad Hasnain 2019년 4월 24일
Yes, they are all of the same size 15x38

댓글을 달려면 로그인하십시오.

채택된 답변

madhan ravi
madhan ravi 2019년 4월 24일
편집: madhan ravi 2019년 4월 24일
C = cell2mat(cellfun(@(x) x(1,:), A, 'un',0));
save mymat.mat C

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Types에 대해 자세히 알아보기

태그

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by