際際滷

際際滷Share a Scribd company logo
Matlab: Control Statements
Conditional StatementsIf - elseif  elsewhilefor
if, elseif, elseIf <condition is met>	then do thiselse	do thisend
if, elseif, elseIf <condition is met>	then do thiselseif <other condition met>	do thiselseif <other condition met>	do thiselse	do thisend
whileThe statements inside the while loop will keep executing repeatedly till the condition is false.while <condition>	//keep repeating till above condition is met	.	.end
whilewhile <condition>	//keep repeating	.	.end
forfor variable = initval:endval	statement ... 	statementendThe 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.
forinputoutput
Visit more self help tutorialsPick 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

More Related Content

Matlab: Control Statements

  • 2. Conditional StatementsIf - elseif elsewhilefor
  • 3. if, elseif, elseIf <condition is met> then do thiselse do thisend
  • 4. if, elseif, elseIf <condition is met> then do thiselseif <other condition met> do thiselseif <other condition met> do thiselse do thisend
  • 5. whileThe statements inside the while loop will keep executing repeatedly till the condition is false.while <condition> //keep repeating till above condition is met . .end
  • 7. forfor variable = initval:endval statement ... statementendThe 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.
  • 9. Visit more self help tutorialsPick 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