Exclusive or between two different matrix size ?

1 回表示 (過去 30 日間)
I Made
I Made 2013 年 3 月 13 日
I have two matrix A and B where e.g
A < 1 x 500 >
B < 1 x 32 >
i wanted to perform xor, but i wanted xor(A,B) only the first 32 element of A xor B so we don't have matrix size problem. The size of A and B is dynamic, basiccaly i wanted to perform xor(A,B) where the elemen of A that processed is the first elemen until it reach B size ? how do i perform xor like that so that the output become :
C < 1 x 32 >
can anyone help?

採用された回答

Walter Roberson
Walter Roberson 2013 年 3 月 13 日
C = xor(A, B(1:length(A)))
  1 件のコメント
I Made
I Made 2013 年 3 月 13 日
Thanks man, perfect.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMathematics についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by