I have a matrix of 2000*512 and I want to assign each 10 to a matric so with total of 200 matrices
G1 = M(1:10 , :)
G2 = M(11:20, :) and so on
How can I do it in more professional way since I need to reach to G200
Please Help

댓글 수: 1

Stephen23
Stephen23 2021년 3월 4일
편집: Stephen23 2021년 3월 4일
"How can I do it in more professional way since I need to reach to G200 "
The "more professional way" would be to avoid numbered variables entirely and use a simple cell array.

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

 채택된 답변

KALYAN ACHARJYA
KALYAN ACHARJYA 2021년 3월 4일
편집: KALYAN ACHARJYA 2021년 3월 4일

0 개 추천

G=mat2cell(M,10*ones(1,2000/10))
All are individual matrices, you have to save matrices in the cell array (easiest way)

추가 답변 (0개)

카테고리

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

태그

질문:

2021년 3월 4일

편집:

2021년 3월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by