필터 지우기
필터 지우기

comparing values of two matrix

조회 수: 1 (최근 30일)
Akmyrat
Akmyrat 2014년 8월 13일
답변: Andrei Bobrov 2014년 8월 13일
Hi lets say I have 2 matrices A=[1 2 1 2 3 3], B=[1 2 2 1 3 3], i want to compare values of matrix and write in different matrix C, if same "s", if not same "n". result should be C=['s' 's' 'n' 'n' 's' 's'], thanks !!

채택된 답변

Andrei Bobrov
Andrei Bobrov 2014년 8월 13일
c0 = {'n','s'};
C = c0( 1+(A == B));

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by