MATLAB Answers


How to obtain data from elements in cell arrays

Hans123 님이 질문을 제출함. 21 Jun 2019
최근 활동 Hans123 님이 댓글을 추가함. 21 Jun 2019
I have a cell array A that is a 1x1600 cell.
Each element in the cell has a 2500x3 array.
I need to take the second column of each element as use it in my calculation.
Using A{2} I get the whole second 2500x3 array. What line of code should I write to retrieve only the second column of this 2300x3 array.
Basically I need the (:,2).
I hope I was clear enough.
I am new to cell arrays, would really appreciate help

  댓글 수: 0

로그인 to comment.

답변 수: 1

Geoff Hayes 님의 답변 21 Jun 2019
 채택된 답변

Hans123 - try doing
to get the second column of the second element of A.

  댓글 수: 1

Thanks Geoff, works exactly as I want it to

로그인 to comment.

Translated by