Can you show me how to write an if statement for this?
I have it in my code. It will not work for the last test.
% this if statement would not work with a=[0 0 1 1];b=[1 0 1 0];.
%if (a==0 & b~=0) || (b==0 & a~=0)
%i = 1;
%else
%i = 0;
%end
%y = i;
Problem statement was not specific and didn't indicate the inputs a, b could be vectors.
Sorry, I just wondered if xor was somehow restricted on this cody . . . I guess not.
just wonder how do you check people using xor() or not, :)
sent from my iPhone.
3968 Solvers
228 Solvers
Find the sum of the elements in the "second" diagonal
994 Solvers
Remove the two elements next to NaN value
411 Solvers
2314 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!