Please help with MATLAB function

(a) Write a function using "if‟ statements that takes two numbers as input and returns true or false for the conditions below (use 1 for true, 0 for false):

Conditions

1) Whether BOTH numbers are equal when rounded

2) Whether BOTH numbers are odd when rounded

3) Whether EITHER number is negative

4) Whether EITHER number is within 0.2 of +1

5) None of the above

The first line of the function code should be:

function [are_equal, are_odd, is_neg, is_near1, none] = MyCompare(n1,n2)

(b) Rewrite the function in part (a) WITHOUT using any „if‟ statements that takes two numbers as input and returns true or false given the conditions below (use 1 for true, 0 for false):

The first line of the function code should be:

function [are_equal, are_odd, is_neg, is_near1, none] = MyCompare2(n1,n2)

(c) Write an M-file to that uses the functions in part (a) and (b) to test the

following user inputs:

(i) -4 & -4

(ii) -4 & 4

(iii) 4 & 16

(iv) 3 & 3

(v) 0.8 & 1.2