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 LawsExplanation / 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
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.