Logo Background

end

  • Written by matlabtutorialsmatlabtutorials No Comments Comments
    Last Updated: March 6, 2008

    Terminate scope of FOR, WHILE, SWITCH, TRY, and IF statements. Without ’s, FOR, WHILE, SWITCH, TRY, and IF wait for further input. Each is paired with the closest previous unpaired FOR, WHILE, SWITCH, TRY or IF and serves to terminate its scope.

    can also serve as the last index in an indexing expression. In that context, = SIZE(X,k) when used as part of the k-th index. Examples of this use are, X(3:) and X(1,1:2:-1). When using to grow an array, as in X(+1) = 5, make sure X exists first.

    (A,K,N) is called for indexing expressions involving the object A when is part of the K-th index out of N indices. For example, the expression A(-1,:) calls A’s method with (A,1,2).

    See also for, while, switch, try, if.
    Overloaded methods
    help serial/.m