MATLAB Answers

RuiQi
0

how to convert cell to array

Asked by RuiQi
on 5 Dec 2016
Latest activity Answered by Jan
on 5 Dec 2016
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 ?

  0 Comments

Sign in to comment.

Tags

2 Answers

Answer by Azzi Abdelmalek
on 5 Dec 2016
Edited by Azzi Abdelmalek
on 5 Dec 2016
 Accepted Answer

If v is your cell array
out=cell2mat(v([1 3 4 5 7 ]))

  0 Comments

Sign in to comment.


Jan
Answer by Jan
on 5 Dec 2016

out = cat(2, v{[1 3 4 5 7]});

  0 Comments

Sign in to comment.