Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Conditional Control in MATLAB Scripts with Examples


In this lecture we discuss more about programming in Matlab. One main section in programming is flow control. There are many flow control commands in MATLAB. In this lecture we discuss the conditional flow control commands.
Conditional statements are commands that allows MATLAB to decide whether or not to execute some code that follows the statement

Conditional statements use relational operators like ==,~=,>,
The basic syntax is


žIf the conditional expression is true, MATLAB runs the lines of code that are between the line with if and the line with end.
If the conditional expression is false, MATLAB skips the code between if and the line with else and runs the code up to end.


Conditional Control in MATLAB Scripts from Shameer Ahmed Koya



This post first appeared on Electrical Engineering Tutorial, please read the originial post: here

Share the post

Conditional Control in MATLAB Scripts with Examples

×

Subscribe to Electrical Engineering Tutorial

Get updates delivered right to your inbox!

Thank you for your subscription

×