Question: %Program truth.m % Construct the truth table for proposition(s) in propos.m clear format compact global num propos(-1); tot=2^num; separt=888; disp(' Basic variables 888 Proposition value(s)')

%Program truth.m % Construct the truth table for proposition(s) in propos.m clear format compact global num propos(-1); tot=2^num; separt=888; disp(' Basic variables 888 Proposition value(s)') for i=1:tot q=i-1; for j=1:num r=rem(q,2); p(num+1-j)=r; q=(q-r)/2; end prop=propos(p); disp([p separt prop]) end %propos function prop=propos(p) global num if p<0 num=3 else prop(1)=~p(1) | p(3); prop(2)=~(~p(1) p(3)); prop(3) =p(2)&~(~p(1) end student

2. Write out by hand the truth tables for the following compound propositions. Decide which are tautologies, contradictions or neither. Verify your answers (showing your reasoning) using the MATLAB programtruth.m with func tion propos .m given in Section 7.3 of the Unit Notes (and also available on the LMS). 2. Write out by hand the truth tables for the following compound propositions. Decide which are tautologies, contradictions or neither. Verify your answers (showing your reasoning) using the MATLAB programtruth.m with func tion propos .m given in Section 7.3 of the Unit Notes (and also available on the LMS)

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!