matlab switch case 使用。

12 ビュー (過去 30 日間)
svukqfev
svukqfev 2023 年 5 月 25 日
回答済み: vswsfkrn 2023 年 5 月 25 日
程序内容:
f=input('输入第一个字母(大写字符)')
switch f
case {S}
disp('Sunday')
end
输出:
错误使用 input
函数或变量 'S' 无法识别。
出错 shiyanbaogao5_10 (line 1)
f=input('输入第一个字母(大写字符)')
哪里错了?

採用された回答

vswsfkrn
vswsfkrn 2023 年 5 月 25 日
f = input( '输入第一个字母(大写字符)', 's' )
switch f
case { 'S' }
disp('Sunday')
end

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange二维图和三维图 についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!