当前位置:网站首页>Day (5) of picking up matlab
Day (5) of picking up matlab
2022-04-23 15:59:00 【Sola_ Ex】
Pick up MATLAB The fifth day of
Matlab
Two dimensional curve drawing
plot() function
plot(x,y) %x Abscissa ,y Vertical coordinates
ploy(y) % Serial number as abscissa ,y As ordinate
plot(x,y,s) %s Output style representation
Common graphic decoration commands
Graphics window segmentation
subplot(m,n,p) % Divide the current window into m*n A drawing area ,p For serial number
Such as :
subplot(2,2,1)
subplot(2,2,2)
subplot(2,2,3)
subplot(2,2,4)
Linear Cartesian graph
The drawing commands are as follows :
bar(x,y,s) % Bar chart
stairs(x,y,s) % Stairs
stem(x,y,s) % Bar graph
fill(x,y,s) % Fill in the picture
The example code uses :
x=0:0.4:8;
y = 2*exp(-0.5*x);
subplot(2,2,1);
bar(x,y,'r');
title('bar(x,y,"red")');
axis([-2,8.1,-1,2.1]);
subplot(2,2,2);
bar(x,y,'g');
title('bar(x,y,"green")');
axis([-2,8.1,-1,2.1]);
...
Logarithmic plot
Application scenarios :
- When the variable changes by an order of magnitude in the scope of the study
- When the dependent variable changes a little
- When the curve part needs to be divided into expanded form
- When it is necessary to transform a nonlinear relationship into a linear relationship
There are :
semilogx(x,y,s) % Semilogarithmic coordinates ,x The axis is a logarithmic scale
semilogy(x,y,s) % Semilogarithmic coordinates ,y The axis is a logarithmic scale
loglog(x,y,s) % Semilogarithmic coordinates ,x,y The axis is logarithmic scale
Case use
x=1:1e4;
y=20*log10(x.^2-x.^3);
plot(x,y)
figure; % Create a new picture
semilogx(x,y,'r');
The effect is as shown in the picture :
Polar diagram
polar(theta,rho,s) %theta = Polar coordinates and polar angles ,rho= Polar diameter
The sample code :
t=0:.01:2*pi;
r1=cos(9*t);
polar(t,r1,'-m')
title(' to CK Rose thread ')
I think it's still very good-looking. Ha ha ha !!!
版权声明
本文为[Sola_ Ex]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231554164100.html
边栏推荐
- Accumulation of applet knowledge points
- linux上啟動oracle服務
- 建设星际计算网络的愿景
- Day (8) of picking up matlab
- Config组件学习笔记
- Compile, connect -- Notes
- Function summary of drawing object arrangement in R language
- C language --- string + memory function
- Solution to the fourth "intelligence Cup" National College Students' IT skills competition (group B of the final)
- Partitionby of spark operator
猜你喜欢
Neodynamic Barcode Professional for WPF V11. 0
R语言中实现作图对象排列的函数总结
Multi level cache usage
下载并安装MongoDB
实现缺省页面
WPS brand was upgraded to focus on China. The other two domestic software were banned from going abroad with a low profile
Best practices of Apache APIs IX high availability configuration center based on tidb
捡起MATLAB的第(8)天
Timing model: gated cyclic unit network (Gru)
Configuration of multi spanning tree MSTP
随机推荐
Timing model: gated cyclic unit network (Gru)
Treatment of idempotency
王启亨谈Web3.0与价值互联网“通证交换”
Spark 算子之coalesce与repartition
安装Redis并部署Redis高可用集群
Load Balancer
Spark 算子之distinct使用
保姆级Anaconda安装教程
Extract non duplicate integers
Vim使用Vundle安装代码补全插件(YouCompleteMe)
Redis master-slave replication process
One brush 312 - simple repetition set - Sword finger offer 03 Duplicate number in array (E)
Ice -- source code analysis
JVM - Chapter 2 - class loader subsystem
pywintypes. com_ Error: (- 2147221020, 'invalid syntax', none, none)
Grbl learning (I)
Tencent offer has been taken. Don't miss the 99 algorithm high-frequency interview questions. 80% of them are lost in the algorithm
vim指定行注释和解注释
贫困的无网地区怎么有钱建设网络?
JS regular determines whether the port path of the domain name or IP is correct