フィルターのクリア

sum of polynomials help

7 ビュー (過去 30 日間)
Raiven Balderas
Raiven Balderas 2018 年 4 月 2 日
回答済み: Walter Roberson 2018 年 4 月 2 日
Make a Matlab function called polyadd.m that accepts as input the coefficients of two polynomials and outputs the coefficients of the sum of the two polynomials. The first line should read:
function a = polyadd(c,d)
please help

採用された回答

Walter Roberson
Walter Roberson 2018 年 4 月 2 日
Figure out which vector is shorter. Put enough zeros at the beginning of it to make the two the same length. Add the two, which will now be the same length.
Optionally look at the results and remove leading 0, just in case the coefficients of the two cancel out.

その他の回答 (0 件)

カテゴリ

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