switch
switch statement.
Syntax
switch(expression), case test_expression_1, statements, case test_expression_2, statements, otherwise statements, end
Description
switch statement is used to selective execute code based on the value of either scalar value or a string.
otherwise clause is optional.
Examples
demo_switch.m
See also
for.
History
Author
Allan CORNET
Last updated