Hello!
Im having a problem sorting a matrix
The matrix A is of size 1020x12

I want the 10 first rows of matrix A (consecutevely from left to right) to form the firt colum of matrix B and I need to do this every 10 rows from the whole matrix A to creat the matrix B of size 120,102
I would really appreciaty your help
Thanks in advance

 채택된 답변

Jan
Jan 2022년 5월 7일

0 개 추천

A = rand(1020, 12);
B = reshape(A.', 120, 12);

댓글 수: 1

Contoso Donoso
Contoso Donoso 2022년 5월 8일
Yep! that's it! Thank you very much @Jan. The only thing is that B matrix is 120x102, but this does exactly what I was needing. Thanks again you, have saved so much time to this unexperienced person (me).

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

제품

릴리스

R2020a

질문:

2022년 5월 7일

댓글:

2022년 5월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by