example_ezplot.m

来自「基础程序」· M 代码 · 共 24 行

M
24
字号
% example_ezplot.m
% 演示轻松绘图函数ezplot和ezpolar
% 图一:ezplot绘图(符号函数)
subplot(2,1,1);
syms t;
y=exp(-2*t/3)*sin(1+2*t);
ezplot(y,[pi,3*pi]);
grid on;
title('figure1: ezplot');
xlabel('x');
ylabel('exp(-2*t/3)*sin(1+2*t)');
% 图二:ezplot绘图(匿名函数)
subplot(2,1,2);
f_hdl=@(x) sin(x)/(x);
ezplot(f_hdl,[-15,15]);
title('figure2: ezplot');
xlabel('x');ylabel('sin(x)/x');
grid on;
% 图三:ezpolar绘图
figure(2);
ezpolar('1+cos(t)');
grid on;
title('figure ezpolar');

⌨️ 快捷键说明

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