Question: Variables x and y are provided as x = [ 0 , - 2 , 5 . 5 , 0 , - 1 , 2

Variables x and y are provided as x=[0,-2,5.5,0,-1,2],y=[0,-2,8,1,-1.0,0]. Write the results
(logical true or false) of the following 4 logical sentences without using MALAB. Explain how you
determine the answer.
a.z=x and y
b.z=x or y
c.z=x and y or ( notx
c. is smaller or equal to 0) and (y is larger than 0)
d. is smaller than y) or (x is equal to y)
Check the logical answer of prob.3 by using MATLAB. Show the MATLAB logical expression and
answer. Compare the results between prob 3 and 4.
NOTE: If they are different, either one of the results is incorrect. Check it well!
 Variables x and y are provided as x=[0,-2,5.5,0,-1,2],y=[0,-2,8,1,-1.0,0]. Write the results

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!