小编教你搜狗浏览器更改页面字体的方法步骤。
软件教程

如何在 matlab 中输出结果
在 MATLAB 中输出结果有几种方法:
如何使用 disp() 函数
语法:
disp(variable_or_text)登录后复制
例如:
x = 5;
disp(x) % 输出:5
disp('Hello World!') % 输出:Hello World!登录后复制如何使用 fprintf() 函数
语法:
fprintf(format_string, variables)登录后复制
其中:
例如:
fprintf('Value of x: %d\n', x) % 输出:Value of x: 5
fprintf('%.2f is the value of pi\n', pi) % 输出:3.14 is the value of pi登录后复制如何使用 printf() 函数
语法:
printf(format_string, variables)登录后复制
与 fprintf() 类似,但不会返回任何值。
如何使用 plot() 函数
语法:
plot(x, y)登录后复制
其中:
例如:
x = 1:10; y = x.^2; plot(x, y) % 绘制一个 x^2 的曲线图登录后复制
以上就是matlab怎么输出结果的详细内容,更多请关注楠楠科技社其它相关文章!