disp函数

disp()屏幕输出函数,直接将内容展示到matlab命令窗口中,常用于提示程序进程和状态,显示运算结果等;

类似c里面的printf();

1普通用法

disp(‘this is example’)

2含变量用法
for i=1:10
disp(['this is the ',num2str(i),' times...'])

end

猜你喜欢

转载自blog.csdn.net/qq_28829409/article/details/80184414
今日推荐