MATLAB Curve fitting with custom equation (max/min)
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Piotr Jaskowski
am 10 Jan. 2022
Bearbeitet: Matt J
am 10 Jan. 2022
Hi,
I would like to write my model equation: Asinx+k and I know that k=[max(data)-min(data)] / 2 for my dataset
How can i write k in curve fitting with custom equation?
Best Regards,
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Walter Roberson
am 10 Jan. 2022
You can bind it in using an anonymous function; http://www.mathworks.com/help/matlab/math/parameterizing-functions.html
However, I wonder if it is worth doing?
y = A*sin(x) + k %with known k
y - k = A * sin(x)
A = (y - k) ./ sin(x)
and for fitting purposes, the best A would be mean() of the right hand side.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Get Started with Curve Fitting Toolbox finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!