• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Matlab: Control Statements
 

Matlab: Control Statements

on

  • 2,625 views

Matlab: Control Statements

Matlab: Control Statements

Statistics

Views

Total Views
2,625
Views on SlideShare
2,531
Embed Views
94

Actions

Likes
1
Downloads
0
Comments
0

3 Embeds 94

http://www.dataminingtools.net 71
http://dataminingtools.net 21
http://www.slideshare.net 2

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Matlab: Control Statements Matlab: Control Statements Presentation Transcript

    • Matlab: Control Statements
    • Conditional Statements
      If - elseif – else
      while
      for
    • ‘if, elseif, else’
      If <condition is met>
      then do this
      else
      do this
      end
    • ‘if, elseif, else’
      If <condition is met>
      then do this
      elseif <other condition met>
      do this
      elseif <other condition met>
      do this
      else
      do this
      end
    • while
      The statements inside the ‘while’ loop will keep executing repeatedly till the condition is false.
      while <condition>
      //keep repeating till above condition is met
      .
      .
      end
    • while
      while <condition>
      //keep repeating
      .
      .
      end
    • for
      for variable = initval:endval
      statement
      ...
      statement
      end
      The statements inside the ‘for’ loop will be exectuted repeatedly till the variable reaches ‘endvalue’ as defined in the declaration. At each successive cycle, the variable is incremented/decremented by one unit so as to change it from the initial value to the final value progressively.
    • for
      input
      output
    • Visit more self help tutorials
      Pick a tutorial of your choice and browse through it at your own pace.
      The tutorials section is free, self-guiding and will not involve any additional support.
      Visit us at www.dataminingtools.net