当前位置:网站首页>Tips in MATLAB
Tips in MATLAB
2022-04-23 03:03:00 【liusaisaiV1】
Number operation and matrix operation
.*
: Is the multiplication or division of the corresponding elements ; Point multiplication requires that the two involved in the operation must have the same dimension ;
*
: Is matrix multiplication or division ; The dimension of the column of the former matrix is required to be equal to the dimension of the row of the latter matrix .
.^
: Is to multiply each element . such as A It's a matrix ,A^2=A*A
,
^
: Such as :A.^2=B
,B by A A matrix in which all elements are squared , to A One of the aij
,B The corresponding position in is aij^2
mapping
Draw a piecewise curve
%1 to X assignment
x = -70 : 0.01 : 65;
%2 to Y Assign and determine X The range of ; The interval method is function .*( Section );
y2 =
(6+sqrt(20*20-(x+40).*(x+40))).*(x>=-70&x<-62)+
(15+sqrt(10*10-(x+50).*(x+50))).*(x>=-62&x<-49)+
(9+sqrt(12*12-(x+56).*(x+56))).*(x>=-49&x<-39)+
(-tan(23/18)*x-92).*(x>=-39&x<-38)+
(16-sqrt(11*11-(x+25).*(x+25))).*(x>=-38&x<-29)+
(100-sqrt(100*100-(x+1.25).*(x+1.25))).*(x>=-29&x<-9)+
(498.975-sqrt(500*500-(x-32).*(x-32))).*(x>=-9&x<20)+
(-220+sqrt(220*220-(x-15).*(x-15))).*(x>=20&x<42)+
(-0.125*x+2).*(x>=42.&x<60)+
25.*(x>=60&x<=65);
%3 plot
plot(x,y2);
Be careful :matlab Be sure to write a long line ! Cannot write in segments , Otherwise an error .
版权声明
本文为[liusaisaiV1]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220630032537.html
边栏推荐
- Passing object type parameters through openfeign
- C#语法糖空合并运算符【??】和空合并赋值运算符【 ??=】
- Depth deterministic strategy gradient (ddpg)
- 基于.NetCore开发博客项目 StarBlog - (1) 为什么需要自己写一个博客?
- 腾讯视频涨价:一年多赚74亿!关注我领取腾讯VIP会员,周卡低至7元
- C# 读写二进制文件
- 使用栈来解决”迷你语法分析器“的问题
- The space between the left and right of the movie ticket seats is empty and cannot be selected
- The difference between encodeuri and encodeuricomponent
- Q-Learning & Sarsa
猜你喜欢
C# WPF UI框架MahApps切换主题
Response processing of openfeign
Binary tree
Configuring Apache Web services for servers such as Tianyi cloud
【新版发布】ComponentOne 新增 .NET 6 和 Blazor 平台控件支持
樹莓派開發筆記(十二):入手研華ADVANTECH工控樹莓派UNO-220套件(一):介紹和運行系統
树莓派开发笔记(十二):入手研华ADVANTECH工控树莓派UNO-220套件(一):介绍和运行系统
Dynamic sequence table + OJ
最通俗易懂的依赖注入之服务容器与作用域
JS learning notes
随机推荐
ele之Table表格的封装
Centos7 install MySQL 8 0
Deep q-network (dqn)
tf. keras. layers. Timedistributed function
The input of El input input box is invalid, and error in data(): "referenceerror: El is not defined“
Systemctl start Prometheus + grafana environment
HLS / chisel uses CORDIC hyperbolic system to realize square root calculation
Résumé du gestionnaire de projet du système d'information Chapitre VI gestion des ressources humaines du projet
Face longitude:
Judge whether there is a leap year in the given year
FileNotFoundError: [Errno 2] No such file or directory
Distributed system services
[if you want to do a good job, you must first use its tools] Guide for downloading and using paper editing and document management (endnote, latex, jabref, overflow) resources
利用栈的回溯来解决“文件的最长绝对路径”问题
tf. keras. layers. Density function
树莓派开发笔记(十二):入手研华ADVANTECH工控树莓派UNO-220套件(一):介绍和运行系统
【鉴权/授权】自定义一个身份认证Handler
Wepy learning record
REINFORCE
In redis cluster, the master node fails, and the IP changes after the master-slave switch. The client does not need to deal with it