0
$\begingroup$

I've got a maths question that I need to translate into matlab syntax to run through and I'm slightly stuck so hopefully someone here can help since I can't seem to find my answer online.

The equation is as follows: (¬p ∧ q) ∧ (r → p) ∧ (¬r → s) ∧ (s → t) ⇒ t

So far, in matlab I have:

(~p(1) & p(2)) & (p(3) <= p(1)) & (~p(3) <= p(4)) & (p(4) <= p(5))

But I'm not sure how to input the ⇒ t

Can anyone help me with the syntax for the arrow?

Thank you!

$\endgroup$
1
$\begingroup$

Well I played around in matlab a little more and realised that:

→ and ⇒

have exactly the same matlab syntax:

<=

But I'll leave this up here for other people :)

$\endgroup$
  • $\begingroup$ By the way, do you realize why it's "<="? It's because $0,1$ are used to represent $false,true$. $\endgroup$ – user21820 May 18 '16 at 5:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.