2-6.m

来自「文件是学习matlab过程中关于图形图像处理的源程序」· M 代码 · 共 17 行

M
17
字号
figure;
%下面的符号函数在下面章节中会详细说明
subplot(2,3,1)
%对于变化剧烈的函数,可用fplot来进行较精确的绘图
fplot('humps',[0 1])
subplot(2,3,2)
fplot('abs(exp(-j*x*(0:9))*ones(10,1))',[0 2*pi])
subplot(2,3,3)
fplot('[tan(x),sin(x),cos(x)]',2*pi*[-1 1 -1 1])
%这里x为符号变量,下面的t也是,后面的数组为绘图范围
subplot(2,3,4)
fplot('sin(1 ./ x)', [0.01 0.1],1e-3)
subplot(2,3,5)
ezplot('cos(x)')
%ezplot为函数绘图函数
subplot(2,3,6)
ezplot('sin(3*t)*cos(t)','sin(3*t)*sin(t)',[0,pi])

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?