MATLAB Function Reference    
case

Case switch

Description

case is part of the switch statement syntax, which allows for conditional execution.

A particular case consists of the case statement itself, followed by a case expression, and one or more statements.

A case is executed only if its associated case expression (case_expr) is the first to match the switch expression (switch_expr).

Examples

The general form of the switch statement is:

See Also

switch


  cart2sph cat