Store columns in a matrix in different variables
15 次查看(过去 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 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!