필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Sorting a m x n matrix

조회 수: 1 (최근 30일)
t4741
t4741 2019년 9월 7일
마감: MATLAB Answer Bot 2021년 8월 20일
I have an M x N array for example ;
[1;2;3;4;5;6;7;8;9]
and i want to sort it into the format where the first three values become the first column,then 4 5 6 are the second column etc. So it will output
[1 4 7; 2 5 8; 3 6 9]
Is there a function that can do this, or how should I approach this?

답변 (1개)

madhan ravi
madhan ravi 2019년 9월 7일
reshape([1;2;3;4;5;6;7;8;9],3,[])

이 질문은 마감되었습니다.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by