Labeling arrays of matrix and accessing another array of matrix

조회 수: 1 (최근 30일)
HIRAKJYOTI BASUMATARY
HIRAKJYOTI BASUMATARY 2017년 10월 22일
답변: Image Analyst 2017년 10월 22일
Hie everyone i am new to matlab , and i am stuck in a small technique. Suppose i have a matrix(M) and matrix(N) of same number of rows and each row i want to label it . So that if there is another array 'y' and it is equal to one of the arrays of M matrix. Then it should return me the label and the corresponding row array of matrix N. How will i be able to achieve it.
function sauu
M=[1 2 3 4 5;6 7 8 9 10;11 12 13 14 15]
N=[111 33 55;44 55 66;88 66 99]
y=[6 7 8 9 10];
ty=isequal(M,y)
end

답변 (1개)

Image Analyst
Image Analyst 2017년 10월 22일
See ismember(), ismembertol(), or strfind().

카테고리

Help CenterFile Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by