Theme Graphic
Theme Graphic

Learning by examples

tutorial,example,tips,maple,matlab,C++,visual C++,java,C#,php,mysql,database,programming,computer

Subscribe

Author

Archive

Tags

Posted on Wednesday, May 26, 2010 at 5:46 AM

Matlab Tutorial 7 – If statement

Matlab Tutorial 7 – If statement

There are times when you would like your algorithm/code to make a decision, and the “if” statement is the way to do it. The general syntax in MATLAB is as follows : if relation statement(s) elseif relation % if applicable statement(s) % if applicable else % if applicable statement(s) % if applicable end The logical operators (&, |, ~) could also be used to create more complex relations. Let us illustrate the “if” statement through a simple example. Suppose we would like to define and plot the piecewise defined function

Read more... Matlab Tutorial 7 – If statement

 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.