当前位置:网站首页>Matlab- draw superimposed ladder diagram and line diagram

Matlab- draw superimposed ladder diagram and line diagram

2022-07-27 10:12:00 User 9925864

Superimpose line graph on ladder graph .

Define the data to plot .

alpha = 0.01;
beta = 0.5;
t = 0:10;
f = exp(-alpha*t).*sin(beta*t);

take f Show as ladder . Use hold The function preserves the ladder diagram . Add... With dotted lines marked with stars f Line graph .

stairs(t,f)
hold on 
plot(t,f,'--*')
hold off

Use axis Function to set the axis range . Mark x Axis and add a title to the drawing . axis([0,10,-1.2,1.2]) xlabel('t = 0:10') title('Stairstep plot of e^{-(\alpha*t)} sin\beta*t')

原网站

版权声明
本文为[User 9925864]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/208/202207270956062230.html