example_fplot.m
来自「基础程序」· M 代码 · 共 17 行
M
17 行
% example_fplot.m
% 通过fplot函数绘制曲线
% 图一:绘制humps函数
subplot(2,1,1);
fplot(@humps,[-0.5,3]);
title('figure1: humps');
xlabel('x');ylabel('humps(x)');
grid on;
% 图二:绘制函数sin(x)/x的曲线
subplot(2,1,2);
f_hdl=@(x) sin(x)/(x);
fplot(f_hdl,[-10,10]);
title('figure1: sin(x)/x');
xlabel('x');ylabel('sin(x)/x');
grid on;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?