how xor is used between two no.? or which command ?

조회 수: 1 (최근 30일)
Sultan Mehmood
Sultan Mehmood 2019년 6월 14일
편집: Stephen23 2019년 6월 14일
LL=mod(176+233,256) xor (142);

채택된 답변

Stephen23
Stephen23 2019년 6월 14일
편집: Stephen23 2019년 6월 14일
I suspect that you actually want to be using bitxor (and possibly also specify the classes):
>> bitxor(mod(176+233,256),142)
ans = 23
Note that xor, like all logical operators in MATLAB, treats non-zero elements as true, so given that both mod(176+233,256) and 142 are non-zero we already know that the output will be false:
>> xor(mod(176+233,256),142)
ans = 0

추가 답변 (1개)

Raj
Raj 2019년 6월 14일
편집: Raj 2019년 6월 14일
xor(mod(176+233,256),142)
Is this what you are looking for? Is so,a quick MATLAB documentation search would have sufficed instead of taking the pain to post question here.

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by