当前位置:网站首页>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)')
边栏推荐
- About RAC modifying scan IP
- Little artist huangxinyang was invited to participate in the Wuhan station of children's unit of Paris Fashion Week
- 【Go ~ 0到1 】 第二天 6月25 Switch语句,数组的声明与遍历
- Dell r730 server startup error: [xxx] USB 1-1-port4: disabled by hub (EMI?), re-enabling...
- Super Jumping! Jumping! Jumping!
- JS rounding tips
- Cloudcompare & PCL point cloud SVD decomposition
- A - 深海探险
- 叠加阶梯图和线图及合并线图和针状图
- Introduction to Devops Basics
猜你喜欢

关于如何在placeholder中使用字体图标

Redis02 -- an operation command of five data types for ending redis (it can be learned, reviewed, interviewed and collected for backup)

js取整的小技巧

Installing mysql5.7 under Windows

PLSQL installation under Windows

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

What is the bandwidth of the Tiktok server that can be used by hundreds of millions of people at the same time?

The micro kernel zephyr is supported by many manufacturers!

Solution: selenium common. exceptions. WebDriverException: Message: ‘chromedriver‘ execu

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!
Loss损失函数
B_QuRT_User_Guide(30)
Resolution of Rac grid failure to start after server restart
爱分析发布《2022爱分析 · IT运维厂商全景报告》 安超云强势入选!
【Go ~ 0到1 】 第一天 6月24 变量,条件判断 循环语句
Loss loss function
Doris学习笔记之介绍、编译安装与部署
关于在cmd中MySQL不能插中文数据的原因
【学习笔记】最短路 +生成树
Trailing Zeroes (II)
Preparation for Oracle 11g RAC deployment on centos7
Force buckle 1024 video splicing
[learning notes] search
块级元素上下左右居中的两个小技巧
Unity - Pico开发 输入系统等相关API的使用---C#篇
CloudCompare&PCL 点云SVD分解
B_ QuRT_ User_ Guide(28)
Super Jumping! Jumping! Jumping!