How do I add two anonymous function to define the polynomials.
a=@(x) x.^3 + 6*x.^2 + 11*x +6;
>> b=@(x) x.^2 - 2*x +1;
>> syms a, syms b
>> a+b
ans=
a + b

 採用された回答

James Tursa
James Tursa 2017 年 2 月 4 日
編集済み: James Tursa 2017 年 2 月 4 日

1 投票

E.g., using your original "a" and "b" functions, simply:
syms x
a(x) + b(x)

1 件のコメント

Kenny Dang
Kenny Dang 2017 年 2 月 4 日
Thanks a lot man!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Community Treasure Hunt

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

Start Hunting!

Translated by