lecture_04_Branching_6p - 1 1. What are branching...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

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

Unformatted text preview: 1 1. What are branching statements? 2. First type of branching statements: if 3. Second type of branching statement: if else 4. Third type of branching statement: if elseif else 5. Refresher on logical operators Lecture 4: branching statements What are branching statements? Branching statements are conditional clauses which execute instructions based on the value of some variables. Example: if [my grandmother is cool] [she will give me a candy] end This type of logic can be expressed easily with Matlab branching This type of logic can be expressed easily with Matlab branching statements: if What are branching statements? Branching statements are conditional clauses which execute instructions based on the value of some variables. Example: Example of execution of the code Second type of branching statement Branching statements are conditional clauses which execute instructions based on the value of some variables. Example: if [my grandmother supercool] [she will give me candy and a toy]...
View Full Document

Page1 / 2

lecture_04_Branching_6p - 1 1. What are branching...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online