当前位置:网站首页>Four operations and derivative operations of MATLAB polynomials
Four operations and derivative operations of MATLAB polynomials
2022-07-05 11:58:00 【**inevitable**】
MATLAB Four operations of polynomials and derivative operations
- Addition and subtraction operations can be performed directly through "+“ and ”-" To achieve , Different orders , Lower order polynomials must use 0 To fill
- Multiplication passes conv Function implementation , This function is equivalent to finding the convolution of two arrays
for example : Find a polynomial x3+2x2+3x+4 With the polynomial x2+2x+3 Multiply , The code is as follows :
The results obtained are as follows :p1 = [1 2 3 4]; p2 = [1 2 3]; p3 = conv(p1,p2); % Get the coefficient of polynomial multiplication multinomial = poly2sym(p3); % Find the polynomial according to the coefficient
- For division operation, you can pass deconv Function implementation , Equivalent to deconvolution
% Function description
[s,r] = deconv(p,q)
%p: Divisible form
%q: Division
%s: merchant
%r: The rest of the formula
for example : Find a polynomial x3+2x2+3x+4 With the polynomial x2+2x+3 be divided by , The code is as follows :
p1 = [1 2 3 4];
p2 = [1 2 3];
[s,r] = deconv(p1,p2); % Obtain the quotient and remainder after the division of polynomials
The results are as follows :
- For the derivative operation of polynomials, you can use polyder Function implementation
for example :
p = [1 2 3 4];
a = poly2sym(p)
b = poly2sym(polyder(p))
The results are shown below :
边栏推荐
- 【上采样方式-OpenCV插值】
- Yolov 5 Target Detection Neural Network - Loss Function Calculation Principle
- Web API configuration custom route
- pytorch-softmax回归
- Troubleshooting of high memory usage of redis in a production environment
- 程序员内卷和保持行业竞争力
- [yolov5.yaml parsing]
- 谜语1
- MVVM framework part I lifecycle
- Vscode shortcut key
猜你喜欢
随机推荐
[pytorch modifies the pre training model: there is little difference between the measured loading pre training model and the random initialization of the model]
Vscode shortcut key
JS for loop number exception
Unity xlua monoproxy mono proxy class
12.(地图数据篇)cesium城市建筑物贴图
【ijkplayer】when i compile file “compile-ffmpeg.sh“ ,it show error “No such file or directory“.
【 YOLOv3中Loss部分计算】
Multi table operation - Auto Association query
Splunk configuration 163 mailbox alarm
Wireless WiFi learning 8-channel transmitting remote control module
无线WIFI学习型8路发射遥控模块
Which domestic cloud management platform manufacturer is good in 2022? Why?
Web API configuration custom route
redis主从模式
Acid transaction theory
Check the debug port information in rancher and do idea remote JVM debug
【yolov5.yaml解析】
redis的持久化机制原理
Codeworks 5 questions per day (1700 average) - day 5
How to get a token from tokenstream based on Lucene 3.5.0