problem regarding plotting cuvres

조회 수: 1 (최근 30일)
SSBGH
SSBGH 2022년 4월 15일
댓글: SSBGH 2022년 4월 15일
I am supposed to plot 3 curves on the same figure, The first plot is ok( the red one ), but the other 2 I am getting 2 separated curves for each plot..is there any idea to help me solve this problem?
Thanks in advance.
  댓글 수: 4
Walter Roberson
Walter Roberson 2022년 4월 15일
How are you calculating the positions? Are you possibly using roots() or solve() or vpasolve() ?
SSBGH
SSBGH 2022년 4월 15일
im just plotting 3 curves of a differential equation using 2 different approximation methods

댓글을 달려면 로그인하십시오.

채택된 답변

Torsten
Torsten 2022년 4월 15일
편집: Torsten 2022년 4월 15일
Insead of using
plot(x,y)
try
[sorted_x,I] = sort(x);
sorted_y = y(I);
plot(sorted_x,sorted_y)
for the green and blue curves.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by