-1
저는 Matlab 사용자가 아니지만 지금은 처리해야합니다.조건부로 요소를 검색하는 방법은 무엇입니까?
[row,col]=matrix1[matrix1==100];
행을 제외하는 방법은 5입니까?
저는 Matlab 사용자가 아니지만 지금은 처리해야합니다.조건부로 요소를 검색하는 방법은 무엇입니까?
[row,col]=matrix1[matrix1==100];
행을 제외하는 방법은 5입니까?
당신이 (더 효율적인 솔루션이 가능하더라도) 수행해야하는 단계를 설명해야 다음 절차 : 당신이 특정 열을 무시 마지막 두의 순서를 전환하려면
%// Generate some numbers:
matrix1 = randi(4,5);
%// Find the indices of the elements you are looking for:
VALUE_TO_FIND = 3;
[row,col] = find(matrix1==VALUE_TO_FIND);
%// To exclude a certain row, simply "delete" the elements pointing there:
ROW_TO_IGNORE = 4;
col(row==ROW_TO_IGNORE)=[]; %//it is important that this line comes first
row(row==ROW_TO_IGNORE)=[];
을 선들 (그리고 그에 따라 괄호 안의 조건을 바꾼다).
당신은 사후 처리로 수행 할 수
sel = row~= 5;
row = row(sel);
col = col(sell);
게시 예를 작은 매트릭스 당신이 원하는 것을 보여 –