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;
%i = 0;
%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.
Determine if a Given Number is a Triangle Number
give nth decimal place of pi
How long is the longest prime diagonal?
We love vectorized solutions. Problem 1 : remove the row average.
03 - Matrix Variables 5
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office