How to fit data (2 variables) to get an equation?
조회 수: 8 (최근 30일)
이전 댓글 표시
Hi,
I am trying to fit two variables x1 and Y1. I used cuve fitting toolbox but none of the inbuilt function is giving good result. Also seeing scatterplot it gives hint to fit e^x fuction but I am looking for an help to get an eqn which will describe the data best way.
Here is my code
load tetralldown.mat
x=tr;
y=eff;
x1=(tr-mean(tr))/std(tr); # standardization of data should have used zscore though
y1=(eff-mean(eff))/std(eff);
scatter(x1,y1)
xlabel('X variable')
ylabel('y variable')
댓글 수: 0
답변 (1개)
Rishabh Mishra
2020년 9월 29일
Hi,
Based on my understanding of description provided by you. I would like to point out that curve fitting is a process of finding an approximate polynomial mapping from x variable to y. Given the 2D scatter plot of X1 vs Y1 (as you have posted), for same values in X1, we have multiple values of Y1.
This violates the primary rule of function mapping which states that a given point in domain (domain is collection of x values) can have only single mapped value in range (range is collection of y values).As function mapping between X1 & Y1 is not possible, curve fitting of Y1 on X1 cannot be applied. Hence, the curve fit so obtained is inaccurate. Therefore, there is no single curve that fits the given scatter plot.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Descriptive Statistics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!