Lecture 3 Notes

All have same precedence relaonal operators

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: to •  Evaluate to a value •  Arithme=c Expression –  Evaluate to a numerical value –  1+1, 10*sin(t), date() –  Many built- in func=ons •  Boolean Expressions –  Evaluate to true or false •  1 or 0 in Matlab –  Created via Evaluated leY to right, so 5 < x < 6 does not make sense! All have same precedence •  Rela=onal Operators (<, <=, ==, ~=, >, >=) •  Boolean Operators (&, &&, |, ||, ~) 1/30/14 5 1/30/14 6 1/31/14 Logical Operators && logical and: Are both condi=ons true? E.g., we ask “is L ≤ xc and xc ≤ R?” In code: L<=xc && xc<=R! && Logical Operators logical and: Are both condi=ons true? | | logical or: Is at least one condi=on...
View Full Document

Ask a homework question - tutors are online