当前位置:网站首页>Superimposed ladder diagram and line diagram and merged line diagram and needle diagram
Superimposed ladder diagram and line diagram and merged line diagram and needle diagram
2022-06-28 08:31:00 【jk_ one hundred and one】
Catalog
Superimpose step and line diagrams
Superimpose step and line diagrams
This example demonstrates how to superimpose a line graph on a 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 offAs shown in the figure :

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')As shown in the figure :

Merge line and needle charts
This example demonstrates how to combine a line graph and two needle graphs . then , Show how to add a title 、 Axis labels and legends .
Create data and draw a line .
x = linspace(0,2*pi,60);
a = sin(x);
b = cos(x);
plot(x,a+b)
Add two needle graphs in the coordinate area . Use hold on Prevent new drawings from replacing existing drawings .
hold on
stem(x,a)
stem(x,b)
hold off
Add the title 、 Axis labels and legends . Specify legend descriptions in the order in which you create drawings .
title('Linear Combination of Two Functions')
xlabel('Time in \musecs')
ylabel('Magnitude')
legend('a+b','a = sin(x)','b = cos(x)')
边栏推荐
- 广州:金融新活水 文企新机遇
- 神殿
- Why are function templates not partial specialization?
- The micro kernel zephyr is supported by many manufacturers!
- FFMpeg (一) av_register_all()
- Idea related issues
- [learning notes] differential constraint
- DB
- Redis02 -- an operation command of five data types for ending redis (it can be learned, reviewed, interviewed and collected for backup)
- 【力扣10天SQL入门】Day4 组合查询 & 指定选取
猜你喜欢
![[learning notes] shortest path + spanning tree](/img/38/42b7e321389e3a47304fca5c37a2cf.png)
[learning notes] shortest path + spanning tree

Introduction, compilation, installation and deployment of Doris learning notes

广州:金融新活水 文企新机遇

城联优品向英德捐赠抗洪救灾爱心物资

Quelle est la largeur de bande du serveur de bavardage sonore pour des centaines de millions de personnes en même temps?

After installing NRM, the internal/validators js:124 throw new ERR_ INVALID_ ARG_ TYPE(name, ‘string‘, value)

叠加阶梯图和线图及合并线图和针状图

Love analysis released the 2022 love analysis · it operation and maintenance manufacturer panorama report, and an Chao cloud was strongly selected!

Kali installation configuration

Doris学习笔记之介绍、编译安装与部署
随机推荐
[go ~ 0 to 1] on the first day, June 24, variables, conditional judgment cycle statement
设置cmd的编码为utf-8
Solve NPM err! Unexpected end of JSON input while parsing near
【力扣10天SQL入门】Day5+6 合并表
AI chief architect 8-aica-gao Xiang, in-depth understanding and practice of propeller 2.0
Little artist huangxinyang was invited to participate in the Wuhan station of children's unit of Paris Fashion Week
【学习笔记】差分约束
[learning notes] shortest path + spanning tree
B_ QuRT_ User_ Guide(26)
找合适的PMP机构只需2步搞定,一查二问
Case tool
[learning notes] linear basis
App automated testing appium tutorial 2 - ADB command
npm清理缓存
ROS notes (08) - definition and use of service data
Love analysis released the 2022 love analysis · it operation and maintenance manufacturer panorama report, and an Chao cloud was strongly selected!
Why are function templates not partial specialization?
匿名页的反向映射
Dell r730 server startup error: [xxx] USB 1-1-port4: disabled by hub (EMI?), re-enabling...
抗洪救灾,共克时艰,城联优品捐赠10万元爱心物资驰援英德