Store columns in a matrix in different variables
조회 수: 10 (최근 30일)
이전 댓글 표시
Hi,
I have a matrix A (5479 x 378). I need to store every column of the matrix A in separate arrays St1, St2, St3....St378. So each St array will have 5479 x 1.
Can somebody help me with this?
Thanks in advance.
댓글 수: 0
채택된 답변
Azzi Abdelmalek
2014년 6월 17일
편집: Azzi Abdelmalek
2014년 6월 17일
st=num2cell(A,1)
You can access each column by
st{1}
st{2}
추가 답변 (1개)
Jos (10584)
2014년 6월 17일
Why do you want to do this? It is much easier to deal with a specific column using indexing A(:,13) then using variable names like St13 …
k = 13
tmp = A(:,k)
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!