plot_params.m

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

M
17
字号
% plot_params.m
% plot函数参数的示例
% 产生一维自变量向量
t=[0:pi/20:3*pi]';
% 产生需要绘制的复数矩阵
y=exp(-1/3*t).*sin(2*t+3);
y1=exp(-1/3*t);
% 绘制曲线
plot(t,y,'b:*');
xlabel('t');ylabel('y');
hold on;
plot(t,y1,'r-');
title('linestyles and markers');
legend('y=exp(-1/3*t).*sin(2*t+3)','y1=exp(-1/3*t)');
axis square;
grid on;
hold off;

⌨️ 快捷键说明

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