필터 지우기
필터 지우기

How to combine multiple curve fits in one plot?

조회 수: 69 (최근 30일)
Hüsamettin Taysi
Hüsamettin Taysi 2021년 3월 25일
댓글: Matt J 2023년 2월 24일
Hi, this is my first study in Matlab. I have used "cftool" function, and have plotted these two figures. "x", which is "VarName1" is same for both. What I want to do is combine these two figures in one plot. x axis will be same, y axis will extend to maximum y value. Briefly, I want to see all points and their fits in one graph. What am I supposed to do?
Thanks in advance.

답변 (2개)

Matt J
Matt J 2022년 3월 17일
편집: Matt J 2022년 3월 17일
Use the cftool to export each fit to a workspace variable cfit1 and cfit2. Then
plot(cfit1,Varname1,y); hold on
plot(cfit2,Varname1,y1); hold off
  댓글 수: 3
Carlos Eduardo Correia Gatell
Carlos Eduardo Correia Gatell 2023년 2월 24일
This worked perfectly for me. Thank you.
Matt J
Matt J 2023년 2월 24일
@Carlos Eduardo Correia Gatell I'm glad it worked, but if so, please Accept-click the Answer.

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


Daniel Pollard
Daniel Pollard 2021년 3월 25일
This was literally the top result when I googled "plot multiple graphs matlab". For future reference:
  댓글 수: 1
Esra Ilhan
Esra Ilhan 2022년 3월 17일
This link does not necessarly show how to create the plots in the same figure with Curve fitting option ;)

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

카테고리

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