Example and Functions

Matlab and Simulink Controls

  • Controls

    for

    for Repeat statements a specific number of times. The general form of a for statement is: for variable = expr,…

    Read More »
  • Controls

    while

    while Repeat statements an indefinite number of times. The general form of a while statement is: while expression statements END…

    Read More »
  • Controls

    continue

    continue Pass control to the next iteration of FOR or WHILE loop. continue passes control to the next iteration of…

    Read More »
  • Controls

    if

    if if statement condition. The general form of the if statement is if expression statements ELSEIF expression statements ELSE statements…

    Read More »
  • Controls

    end

    end Terminate scope of FOR, WHILE, SWITCH, TRY, and IF statements. Without END’s, FOR, WHILE, SWITCH, TRY, and IF wait…

    Read More »
  • Controls

    The Colon Operator

    The colon, :, is one of MATLAB’s most important operators. It occurs in several different forms. The expression 1:10 is…

    Read More »

Block Title

Back to top button