Curve fitting multiple lots of data within the same gscatter graph?

조회 수: 4 (최근 30일)
Evan Hayes
Evan Hayes 2022년 6월 27일
답변: charan 2023년 10월 12일
Hello, I am trying to find and graph the curve fitting for each of the four classes of data in each graph. The tables of the graph are created from two 1x12 tables with a corresponding value which is referenced in the legend. I've attached an image to the question in order to be as precise as I can be with this request. All help is appreciated and if need be, I'd be happy to explain further.
  댓글 수: 2
Rohit Kulkarni
Rohit Kulkarni 2022년 7월 2일
Do you want to find a fitting curve for each single class or you want to do mutli-class classification?

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

답변 (1개)

charan
charan 2023년 10월 12일
Hello Evan,
I understand that you are trying to fit curves to multiple categories of data plotted in a single scatter plot.
There are multiple functions to do curve fitting in MATLAB. Some of them include “polyfit”, “fitlm” and “lsqcurvefit”. For fitting data of multiple categories, the data can be first joined into a single table and then divided into sub parts based on their categories. This can be done by logical indexing. Then each data can be curve fitted and then plotted onto the same graph by using “hold on”.
You can refer to the below documentation to learn more.
Hope this helps.
Thanks,
Charan.

카테고리

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