A=[1,3,5;9,8,7;10,15,20] use A and matrix addressing to create a 2x3 matrix consisting of the first two elements of the first column, the last two elements of the 2nd column, and the first two elements of the last row.
이전 댓글 표시
답변 (1개)
Andrei Bobrov
2016년 2월 2일
A = randi(125,30,3);% Let A - your data.
b = A';
k = 3:6:numel(A);
b([k,k+1]) = nan;
out = reshape(b(~isnan(b)),2,[])';
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!