order matrix elements and extract the n th element
2 次查看(过去 30 天)
显示 更早的评论
Dear experts, I have this problem:
I need to sort in ascending order all the elements of a matrix.
I have 26 matrices that are inside a cell-array (26x1). And I have to do this operation (sorting) for all these matrices.
After that, I need to put inside another cell-array the nth (3rd, for example) element of each matrix inside this new cell-array, in the same position of original matrix.
I'll do an easy example:
My cell array (2,1) is composed by 2 matrices, A and B, A in position (1,1) and B (2,1)
A = [1 4
3 9]
B = [6 9
3 8]
I need to create new cell-array (2,1), in which I'll have 4 in position (1,1) and 8 in position (2,1).
Thanks in advance for you help.
Lorenzo
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Shifting and Sorting Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!