Problem 7.Write a one-line MATLAB expression that evaluates to a logical 1 if th
ID: 2073652 • Letter: P
Question
Problem 7.Write a one-line MATLAB expression that evaluates to a logical 1 if the sum of a and b is greater than N, unless b is less than 0. Otherwise the statement should evaluate to a logical 0. Write your code so that it shows the output for the following cases: a, a=5,b=4,N-7 b. a=5,b=4,N-11 c. a 5, b-1, N- 2 What to Submit: .In Class: Submit all homework in class on Thursday. Include printouts of all writen MATLAB On Moodle: Upload a single script that contains code for Problem 4, Problem 5, Problem 7, code and any generated plots in an organized manner SumExplanation / Answer
%%% part1%%%
a = 5;
b = 4;
N = 7;
if a+b>N &&b<0
disp('1')
else
disp('0')
end
%%%end%%%
%%% part2%%%
a1 = 5;
b1 = 4;
N1 = 11;
if a1+b1>N1 &&b1<0
disp('1')
else
disp('0')
end
% %%%end%%%
% %%% part3%%%
a2 = 5;
b2= -1;
N2 = 2;
if a2+b2>N2 &&b2<0
disp('1')
else
disp('0')
end
% %%%end%%%