Plotting polynomials side by side.

2 ビュー (過去 30 日間)
Tom
Tom 2012 年 11 月 20 日
Hello,
Is it possible to plot two polynomials next to each other as opposed to on top of each other? The problem being they would both need to originally extend from x values from -1 to 1, but then those x values wouldn't be the same when plotted side by side and the graph would change. This is my approach so far:
x = -1:0.1:1;
c = [-5 4 1 7];
y = polyval(c,x);
plot(x,y)
hold on
c2 = [4 -2 1 9 2];
y2 = polyval(c2,x);
plot(x,y2)

採用された回答

Matt J
Matt J 2012 年 11 月 20 日
編集済み: Matt J 2012 年 11 月 20 日
plot(x+someshift,y2)
  1 件のコメント
Tom
Tom 2012 年 11 月 20 日
ha! Yeah that's pretty much all it was. Thanks.

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

その他の回答 (1 件)

Matt J
Matt J 2012 年 11 月 20 日
編集済み: Matt J 2012 年 11 月 20 日
Why not use SUBPLOT?
  1 件のコメント
Tom
Tom 2012 年 11 月 20 日
Ultimately I am trying to create a singular, randomly curved boundary using polynomials.

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

カテゴリ

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