フィルターのクリア

POLYNOMIAL TO MATRIX CONVERSION

8 ビュー (過去 30 日間)
huriya maheen
huriya maheen 2016 年 2 月 29 日
回答済み: Srivardhan 2023 年 5 月 31 日
suppose we have two polynomials
s0 =h0(x0-x2)-h1x1,
s1 =h0x1+h1(x0-x2)
these two polynomials require 4 multiplications this is reduced to 3 multiplications by writing these equations in matrix form shown below:
can u tell me how to write polynomial into these matrices and code for it in MATLAB

回答 (1 件)

Srivardhan
Srivardhan 2023 年 5 月 31 日
Hi Huriya,
As per my understanding, you would like to write the given polynomials in the matrix form.
MATLAB represents polynomials as numeric vectors, assuming h0, h1, x0, x1, x2, s0, and s1 as symbolic scalar variables. We could define the polynomial in other forms and represent the polynomial in the matrix form.
syms x0 x1 x2 h0 h1 s0 s1
s = [[1 0 -1]; [1 -1 0]]*[[h0 0 0];[0 h0-h1 0];[0 0 h0+h1]]*[x0+x1- x2;x0-x2;x1];
s0 = s(1);
s1 = s(2);
disp(s0)
disp(s1)
For further reference, please check out the links to learn more about polynomial functions and symbolic scalar variables:
I hope this resolves the issue you were facing.

カテゴリ

Help Center および File ExchangePolynomials についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by