How to intagrate three correaltions to find a general eqaution ?

1 view (last 30 days)
I need to intagrate three linear correaltions to find a general eqaution (X- Y plots from experiments). i found the correlations from the experimental data (linear fitting). Now i need to find a genaral general correaltion for all cases. Cound you please hel me to solve this?
Or
I have 3 graphs which can be fitted by linear curve fitting . How can we find the average of these three curves and obtain a general equation? is this method is feasible to formulate the genaral eqaution?
Thanks in advance

Answers (1)

Zuber
Zuber on 15 Feb 2023
Edited: Zuber on 16 Feb 2023
Hi,
I understand that you want to know about how to generate the average of three curves obtained using linear polynomial fitting.
I did a quick search on File Exchange and got to know that this problem can be solved by using the ‘avgcurve’ function available at the following link:
To answer your second query, you can find an approximate best-fit polynomial of nth degree by using the independent (x) and dependent variable (y) of the generated average curve in workspace using the polyfit function as follows:
p = polyfit(x,y,n);
The coefficients of the nth order polynomial are stored in the array p.
For further information regarding the ‘polyfit’ function, you can refer to the documentation here: https://in.mathworks.com/help/matlab/ref/polyfit.html
I hope this answers your query.

Community Treasure Hunt

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

Start Hunting!