a.输入 数据
| 1 2 3 4 | >> x=input('please input a number:') please input a number:22 x = 22 |
b.输入字符串
| 1 2 3 4 | >> x=input('please input a string:','s') please input a string:this is a string x = this is a string |
| 1 2 3 4 5 6 7 8 9 10 11 12 | >> disp(23+454-29*4) 361 >> disp([11 22 33;44 55 66;77 88 99]) 11 22 33 44 55 66 77 88 99 >> disp('this is a string') this is a string >> area=12.56637889; >> fprintf('The area is %8.5f\n',area) The area is 12.56638 >> 免责声明:本文系网络转载或改编,未找到原创作者,版权归原作者所有。如涉及版权,请联系删 |