An if ... end statement consists of an if statement and a boolean expression followed by one or more statements. It is delimited by the end statement.
The syntax of an if statement in MATLAB is –
If the expression evaluates to proper, then the block of code inside the if statement will be completed. If the expression evaluates to false, then the first set of code after the end statement will be done.
Create a script file and type the following code –
When you run the file, it displays the following result –
MATLAB Related Interview Questions
|Basic Simulation Interview Questions||C Interview Questions|
|Embedded Systems Interview Questions||Linux Embedded systems Interview Questions|
|LabView Interview Questions||Java Interview Questions|
|Digital image processing Interview Questions||XLink Interview Questions|
|Embedded C Interview Questions|
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.