MATLAB 嵌套 if-else

2024 年 8 月 29 日 | 阅读 2 分钟
  • if 语句可以嵌套,但每个 if 语句都需要 end 关键字。

语法

示例 1

输出

enter a number greater than 1 and less than 10: 9
a = 9
the random number is: 14
the random number is not divisible by the entered number

示例 2


下一个主题#