MATLAB if-elseif-else...end 语句

2025 年 3 月 17 日 | 阅读 1 分钟

如果我们有多个选项或条件要检查,则使用 elseif 关键字。

语法

if...elseif... else...end 语句的流程图

MATLAB if-elseif-else...end statement

示例 1

输出

n = 9
you are younger