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

Torsten
Torsten 2022년 4월 15일
It seems the x-coordinates are not arranged in an increasing order.
SSBGH
SSBGH 2022년 4월 15일
how can i arrange them in an increasing order?
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일

0 개 추천

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개)

카테고리

도움말 센터File Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기

질문:

2022년 4월 15일

댓글:

2022년 4월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by