Extract columns in a loop
이전 댓글 표시
Hello, I am trying to extract every 2000 rows in a 20000 row column and place each extracted matrix into a separate column to create a 2000x10 matrix. However, I am getting an error: In an assignment A(:) = B, the number of elements in A and B must be the same. Any ideas?
Test=zeros(2000,10);
for w=1:10
Test(w)=zt3((2000.*(w-1))+1:2000.*w,1:1)
end
채택된 답변
추가 답변 (1개)
Walter Roberson
2017년 9월 19일
T = mat2cell(zt3, 2000*ones(1,size(zt3,1)/2000), size(zt3,2));
카테고리
도움말 센터 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!