上传者: lys2019
|
上传时间: 2021-11-09 20:08:50
|
文件大小: 736B
|
文件类型: -
本文的目的: 绘制梯形并标注参数
参数为:斜率,上边沿的宽度以及各个转折点的标注
可以自行调参
Amp = 2;
Fre = 2;
Ste = 56;
Breite = (1/(4*Fre))*((Ste/4/Fre-1)/(Ste/4/Fre))*2;
x1 = (0+Ste/4/Fre)/Ste;
x2 = (1+Ste/(4*Fre))/Ste;
x3 = x2 + Breite;
x4 = (0+(3*Ste)/(4*Fre))/Ste;
figure(1)
x = 0:0.00001:x4;
y = trapmf(x,[x1 x2 x3 x4]);
plot(x,y,'k',[x2 x2],[0 1.1],'--k',[0 x4],[0 0],'--k');
text(x2+Breite/3,0.95,['\uparrow ' 'Breite=' (num2str(Breite,2))]);
text(x2+Breite/40,0.5,['\leftarrowSteigung=' (num2str(Ste,2))]);
xlabel(['P = [',(num2str(x1,3)),', ',(num2str(x2,3)),', ',(num2str(x3,3)),', ',(num2str(x4,3)),']'])
xlim([0 x4])
ylim([-0.05 1.05])