当前位置:网站首页>How does matlab draw the curve of known formula and how does excel draw the function curve image?
How does matlab draw the curve of known formula and how does excel draw the function curve image?
2022-04-23 17:09:00 【Hua Weiyun】
Friends must encounter the problem of drawing function curves ! If you want to draw a function curve quickly and accurately , Can use EXCEL The chart function of , It can make your curves both standard and beautiful . You can also put multiple function images into the same chart for comparison . As shown in the figure below, it is in Excel Positive drawn in 、 Cosine function image :
One 、 Prepare the data
1、 First, according to the function expression Prepare a set of data , Then use the data to draw the function image in the chart . In this example, the data is placed in the area A:C In the column , among A The value in the column is the value of the function argument , stay A Column A1 Cell input "X=", Indicates that this is an independent variable ,A2、A3 And the following cells, input each value of the independent variable from small to large , When actually entering , The input method of equal difference sequence is usually used . How to determine the initial value of the independent variable , Value range , What is the step size between data points , This is to judge according to the specific characteristics of the function . If you want to quickly find the extreme value of the function or see its development trend , The given data points do not have to be equal difference , Can be given as needed . Pictured , The value range I use for drawing is [-6,6], The interval between values is “0.1”.
2、B Column sum C List the values of the two function variables . stay B Column B1 General written expression of cell input function ,y=sin(x), You can add some descriptive characters ; stay B2 Enter the formula according to the function expression in the cell “=SIN(A2)” Then select B2 Cell , Fill drop-down . Also in C Column input function expression and formula . Pictured , So the data is ready .
Two 、 Draw function image
1、 Select... In the ribbon “ Insert ” tab , stay “ Chart ” Click... In the group “ Scatter plot → Scatter with smooth lines ”.
2、Excel Insert into the chart area as shown in the figure below , And add the function of chart tool in the function area “ Design ”、“ Layout ”“ Format ” tab .
3、 First, select the data of the chart , Right click in the chart area , Choose... From the shortcut menu that pops up “ Select data ”.
4、 In the pop-up “ Select data source ” Select... In the dialog box “ add to ”, eject “ Edit data series ” Dialog box , Pictured , Choose the data we have prepared , spot “ determine ”. So the sine function image is added , Also add the cosine function .
5、 After adding the data function, the image will come out , Pictured , We found that there were many places that didn't meet the requirements , What needs to be revised .
6、 First, the legend and grid lines , We don't need to , You can delete . Select the legend in the chart , Press Delete Key delete , Then select the grid line , Press Delete Key delete .
7、 Secondly, the scale of the two coordinate axes does not meet the requirements , In order to better adjust the coordinate axis , First, set the chart area to square , stay “ Format ” tab “ size ” In the group , Adjust the height and width to the same .
8、 Right click on each coordinate axis , Choose... From the shortcut menu that pops up “ Format axis ”.
9、 In the pop-up “ Format axis ” In the dialog box “ Axis options ” In the column , take “ minimum value ”、“ Maximum ”、“ Main scale unit ” Is set to “ Fix ”, And enter... In the following text boxes “-6”、“6”、“1”, single click “ close ” Button . The two axes are set in the same way .
10、 then , After setting the line color and linetype of the function image , Right click the function image , Choose... From the shortcut menu that pops up “ Format data series ”.
11、 In the pop-up “ Format data series ” In the dialog box “ line color ”、“ Linetype ” In the column , Set the line color and linetype of the function image respectively .
12、 Finally, add a function expression to each image , First click to select a function image , Then click on a data point to select a data point , Right click on the data point , Choose... From the shortcut menu that pops up “ Add data label ”.
13、 Then right click on the data point , Choose... From the shortcut menu that pops up “ Format data labels ”.
14、 In the pop-up “ Format data labels ” In the dialog box , Set the contents of the function label respectively 、 Position and border color, etc .
15、 At this point, the standard and beautiful function image is set up . The following is my parabola function image .
版权声明
本文为[Hua Weiyun]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231707302162.html
边栏推荐
- SQL database
- Detailed explanation of Niuke - Gloves
- JS to find the character that appears three times in the string
- Net standard
- Decimal format decimal / datetime conversion processing
- Node access to Alipay open platform sandbox to achieve payment function
- Collect blog posts
- SPC introduction
- About stream flow, write it down briefly------
- ◰ GL shader handler encapsulation
猜你喜欢
Getting started with JDBC
ACL 2022 | dialogved: a pre trained implicit variable encoding decoding model for dialogue reply generation
Detailed explanation of the penetration of network security in the shooting range
VLAN高级技术,VLAN聚合,超级Super VLAN ,Sub VLAN
Detailed explanation of Milvus 2.0 quality assurance system
自定义my_strcpy与库strcpy【模拟实现字符串相关函数】
[PROJECT] small hat takeout (8)
文件操作《二》(5000字总结篇)
1-1 NodeJS
Net standard
随机推荐
【生活中的逻辑谬误】稻草人谬误和无力反驳不算证明
Solution architect's small bag - 5 types of architecture diagrams
Milvus 2.0 détails du système d'assurance de la qualité
[markdown notes]
蓝桥杯省一之路06——第十二届省赛真题第二场
Use of shell awk command
Paging SQL
ClickHouse-数据类型
【WPF绑定3】 ListView基础绑定和数据模板绑定
How much do you know about the process of the interview
Nodejs reads the local JSON file through require. Unexpected token / in JSON at position appears
PostgreSQL column storage and row storage
org. apache. parquet. schema. InvalidSchemaException: A group type can not be empty. Parquet does not su
First knowledge of go language
Promise (II)
freeCodeCamp----shape_ Calculator exercise
Sub database and sub table & shardingsphere
Conversion between hexadecimal numbers
SPC introduction
Deeply understand the relevant knowledge of 3D model (modeling, material mapping, UV, normal), and the difference between displacement mapping, bump mapping and normal mapping