how to convert cell to array

조회 수: 6 (최근 30일)
RuiQi
RuiQi 2016년 12월 5일
답변: Jan 2016년 12월 5일
I have 1 x 7 cell. Each cell has 20000 x 1 array. How do I take 1st column and 3rd 4th 5 7 7 column ? So result becomes 20000 x 5 array ?

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2016년 12월 5일
편집: Azzi Abdelmalek 2016년 12월 5일
If v is your cell array
out=cell2mat(v([1 3 4 5 7 ]))

추가 답변 (1개)

Jan
Jan 2016년 12월 5일
out = cat(2, v{[1 3 4 5 7]});

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by