disp()屏幕输出函数,直接将内容展示到matlab命令窗口中,常用于提示程序进程和状态,显示运算结果等;
2含变量用法
for i=1:10
disp(['this is the ',num2str(i),' times...'])
类似c里面的printf();
1普通用法disp(‘this is example’)
for i=1:10
disp(['this is the ',num2str(i),' times...'])
end