MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   资料存档 (https://www.labfans.com/bbs/forumdisplay.php?f=72)
-   -   Matlab:多项式展开例程 (https://www.labfans.com/bbs/showthread.php?t=23931)

poster 2019-12-10 20:48

Matlab:多项式展开例程
 
在Mathematica中, [URL="http://www.wolframalpha.com/input/?i=expand+(x%5E3%2B4x%5E2%2B8x-7)%5E4"]很容易扩展[/URL]诸如

(ax^2+bx+c)^n 但是无论如何,我可以在Matlab中做到这一点吗?



[B]回答:[/B]

对于任何任意表达式:并非没有Symbolic Toolbox。 [URL]http://www.mathworks.com/help/toolbox/symbolic/expand.html[/URL]

但是,如果要扩展多项式,则可以使用conv函数。只需循环运行即可。

a = 1; b = 2; c = 3; n = 5; soln = [abc]; for i=1:n-1 soln = conv(soln,[abc]); end

[url=https://stackoverflow.com/questions/3766335]更多&回答...[/url]


所有时间均为北京时间。现在的时间是 19:46

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.