필터 지우기
필터 지우기

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 CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by