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개)

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에 대해 자세히 알아보기

질문:

2016년 2월 1일

답변:

2016년 2월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by