Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

HW4_12 Let condition P be a > 3 and condition Q be a 6. Look at the table below,

ID: 441919 • Letter: H

Question

HW4_12 Let condition P be a > 3 and condition Q be a 6. Look at the table below, which has been filled in for various values of a. (For example, when a=2.8, the condition P is false and condition Q is true). The final column of the table contains logical expression P AND Q. At right is MATLAB code to demonstrate the table entries of that column Find another way to generate the same final column, using different code, but P and Q should not change. Verify your results using MATLAB, and upload code similar to what is shown at right. Hint: google DeMorgan's Laws

Explanation / Answer

%please rate and flag any copier


>> a=2.8;
>> ~(~(a>3) || ~(a<=6))

ans =

0

>> a=3;
>> ~(~(a>3) || ~(a<=6))

ans =

0

>> a=3.2;
>> ~(~(a>3) || ~(a<=6))

ans =

1

>> a=6;
>> ~(~(a>3) || ~(a<=6))

ans =

1

>> a=10;
>> ~(~(a>3) || ~(a<=6))

ans =

0