countries.m
来自「《matlab使用详解》的部分源码」· M 代码 · 共 18 行
M
18 行
% 函数文件countries,输入的国家名称,确定其举办的奥运的年份
% c为输入的国家名
% 奥运主办城市
function countries
c=input('enter the name of the country:'); % c为一字符串
switch c
case 'Atlanta'
disp('2000')
case 'Sydney'
disp('2004')
case 'China'
disp('2008')
otherwise
disp('before 2000') % 2000年之前的往界
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?