Matlab基础问题 急!
急求答案
Matlab基础问题 急!
答案:1 悬赏:0 手机版
解决时间 2021-07-26 15:41
- 提问者网友:树红树绿
- 2021-07-26 10:12
最佳答案
- 五星知识达人网友:话散在刀尖上
- 2021-07-26 10:40
1.在Matlab下输入edit multiplication.m,再将下面两行%之间内容复制进去,保存退出(实际上就是生成multiplication.m文件)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function multiplication
a=input('Which multiplication table?');
for i=1:12
disp([num2str(i),'×',num2str(a),'=',num2str(i*a)])
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2.在Matlab下输入edit multiplication2.m,再将下面两行%之间内容复制进去,保存退出(实际上就是生成multiplication2.m文件)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function multiplication2
while 1 %loop
a=input('Which multiplication table?');
if =floor(a) %check integer
disp('Please enter an integer number only.');
elseif a>12||aAns %too big
disp('Your guess is too high.');
elseif x
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯