matlab switch case 使用。

14 visualizaciones (últimos 30 días)
svukqfev
svukqfev el 25 de Mayo de 2023
Respondida: vswsfkrn el 25 de Mayo de 2023
程序内容:
f=input('输入第一个字母(大写字符)')
switch f
case {S}
disp('Sunday')
end
输出:
错误使用 input
函数或变量 'S' 无法识别。
出错 shiyanbaogao5_10 (line 1)
f=input('输入第一个字母(大写字符)')
哪里错了?

Respuesta aceptada

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

Más respuestas (0)

Categorías

Más información sobre 二维图和三维图 en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!