How do I raise polynomials to various powers and then multiply them together?
4 ビュー (過去 30 日間)
古いコメントを表示
What is the easiest way to multiply a series of polynomials, some of which are to be squared or cubed or raised to some other power? Also, is there any way to generate output that looks like the sort of typeset polynomial one would see in a textbook as opposed to a concatenation of integers?
4 件のコメント
Image Analyst
2012 年 12 月 31 日
Type ver on the command line to show what toolboxes you have. What do you mean by "a series of polynomials"? Do you have a bunch of equations rather than a numerical values for them at certain range of x values? Do you want to print out formulas with superscripts and Greek letters and other mathematical symbols onto figures, axes, or static text labels on GUIs?
回答 (1 件)
Walter Roberson
2012 年 12 月 31 日
syms x
p1 = 5*x^3 - 7*x^2 - 9*x + 11;
p2 = 5*x^4 + 4*x^3 + 3*x^2 + 2*x + 1;
p3 = p1 * p2;
p3
pretty(p3)
p4 = expand(p3);
p4
pretty(p4);
3 件のコメント
参考
カテゴリ
Help Center および File Exchange で Polynomials についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!