필터 지우기
필터 지우기

using mat2cell

조회 수: 3 (최근 30일)
Joseph Lee
Joseph Lee 2017년 10월 31일
댓글: Star Strider 2017년 10월 31일
M is matrix of 2010x1300
how do i form 201 cells of 10x1300 using mat2cell?

채택된 답변

Star Strider
Star Strider 2017년 10월 31일
This works:
M = randn(2010, 1300);
C = mat2cell(M, 201*ones(1,10), 1300);
See the documentation for an explanation.
  댓글 수: 4
Joseph Lee
Joseph Lee 2017년 10월 31일
thanks!
Star Strider
Star Strider 2017년 10월 31일
My pleasure!
Since my Answer solves the problem you originally posted, please Accept it!

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

추가 답변 (1개)

M
M 2017년 10월 31일
Maybe not the easiest solution, but try something like :
j=1;
for i=1:10:201
A{j}=M(i:i+9,:);
j=j+1;
end
  댓글 수: 1
Joseph Lee
Joseph Lee 2017년 10월 31일
Your solution worked but without the 10
for i=1:201
A{j}=M(i:i+9,:);
j=j+1;
end

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

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by