13.01.2015 Views

Chapter 4: Programming with MATLAB - FET

Chapter 4: Programming with MATLAB - FET

Chapter 4: Programming with MATLAB - FET

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The if and else Statement<br />

The if statement’s basic form is<br />

if logical expression<br />

statements<br />

end<br />

Every if statement must have an<br />

accompanying end statement. The<br />

end statement marks the end of the<br />

statements that are to be executed if<br />

the logical expression is true.<br />

The basic structure for the use of<br />

the else statement is<br />

if logical expression<br />

statement group 1<br />

else<br />

statement group 2<br />

end<br />

Flowchart of the else<br />

structure. Figure 4.4–2<br />

Z.R.K<br />

4-16 More See pages 201-202.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!