matlab使用的几个经典例题~~~
Matlab参考试题
主文件main.m clear; while 1
fprintf('请输入你要调用的文件的序号.\n'); fprintf('0:退出程序\n '); fprintf('1: :绘制……\n'); fprintf('2:一组数据……\n'); fprintf('3:设计一个……\n') fprintf('4:编写m程序……\n') a=input(' '); while (a>4|a<0)
disp('输入有误,重新输入') a=input(' '); end if a==0 break; end
switch a case 1 t1; case 2 t2; case 3 t3; case 4 t4; end end