comparing values of two matrix

3 ビュー (過去 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 Center および File ExchangeMultidimensional Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by