plot
matlab在画图的时候回自动清除之前的图
可以使用hold on hold off来解决这个问题

Plot style

设置曲线风格

legend
给曲线命名


积分的写法
str = '$$ \int_{0}^{2} x^2\sin(x)dx $$';
x = linspace(0, 3);
y = x.^2.*sin(x);
stem(x, y);
str = '$$ \int_{0}^{2} x^2\sin(x)dx $$';
text(0.25,2.5,str,'Interpreter','latex');
annotation('arrow','X',[0.32,0.5],'Y',[0.6,0.4]);
annotation(‘arrow’,‘X’,[0.32,0.5],‘Y’,[0.6,0.4]);
箭头的坐标
text(0.25,2.5,str,‘Interpreter’,‘latex’);显示文本的位置,积分表达式的位置

Graphical Objects

调整图像

获取信息get
x = linspace(0,2*pi,1000);
y = sin(x);
plot(x,y);
h = plot(x,y);
get (h);

设置信息set
通过set设置下面的选项

一次性设置多种属性


delete h 会使线消失,其他设置不变

分开画图

通过figure设置属性



图画存储


856

被折叠的 条评论
为什么被折叠?



