当前位置:网站首页>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
边栏推荐
- Application of Bloom filter in 100 million flow e-commerce system
- s16. One click installation of containerd script based on image warehouse
- MySQL - execution process of MySQL query statement
- Partitionby of spark operator
- MySQL Cluster Mode and application scenario
- Solution to the fourth "intelligence Cup" National College Students' IT skills competition (group B of the final)
- 运维流程有多重要,听说一年能省下200万?
- Fastjon2他来了,性能显著提升,还能再战十年
- Multi level cache usage
- JVM - Chapter 2 - class loader subsystem
猜你喜欢
Construction of esp32 compilation environment
Treatment of idempotency
Master vscode remote GDB debugging
Nanny Anaconda installation tutorial
homwbrew安装、常用命令以及安装路径
5分钟,把你的Excel变成在线数据库,神奇的魔方网表excel数据库
Day (7) of picking up matlab
Spark 算子之partitionBy
Application of Bloom filter in 100 million flow e-commerce system
保姆级Anaconda安装教程
随机推荐
C, calculation method and source program of bell number
GRBL学习(一)
Spark 算子之filter使用
shell_2
Day (10) of picking up matlab
js正則判斷域名或者IP的端口路徑是否正確
Codejock Suite Pro v20. three
Spark 算子之sortBy使用
Win11/10家庭版禁用Edge的inprivate浏览功能
捡起MATLAB的第(5)天
C language --- string + memory function
【自娱自乐】构造笔记 week 2
MetaLife与ESTV建立战略合作伙伴关系并任命其首席执行官Eric Yoon为顾问
Unity Shader学习
dlopen/dlsym/dlclose的简单用法
Install redis and deploy redis high availability cluster
Go language slice, range, set
JS regular détermine si le nom de domaine ou le chemin de port IP est correct
Go concurrency and channel
ESP32编译环境的搭建