Curve fitting and scatter plots
Ältere Kommentare anzeigen
Hi all,
This may not be possible but is there a function or a way you can fit a curve to a select number of points within a scatterplot? Looking specifically to fit a curve around the 'lower boundary' of a scatterplot. For example say I had a scatterplot of hundreds of points that made up a circle. Is there a way to fit a curve around the bottom perimeter?
If you need any more info please ask.
Best
1 Kommentar
dpb
am 22 Sep. 2013
How do you define what is the "bottom perimeter", specifically?
One (probably crude) choice would be to pick all values in the data set whose y-values<=mean(y)
Akzeptierte Antwort
Weitere Antworten (2)
Image Analyst
am 22 Sep. 2013
0 Stimmen
If you know the indexes of those points, then, sure. Just put the arrays with those indexes into polyfit() or whatever you're using.
SCADA Miner
am 13 Nov. 2013
0 Stimmen
Hi Craig, Did you ever figure out how to do this? I want to do the same thing. I have a bunch of measurements which form a scatter plot, I want to fit a curve which is the lower bound for say 95% of those points. I can think of a really inefficient way to do it but surely something already exists? Cheers Tom
3 Kommentare
Image Analyst
am 13 Nov. 2013
Why can't you also just use polyfit()? Then calculate your residuals by subtracting the fit from the data and sorting and taking the lowest 5%. I mean, that's the simple, intuitive way that I'd use. Would that work for you?
Craig
am 22 Nov. 2013
dpb
am 22 Nov. 2013
The polynomial is only of the order you select.
Fit the data; if there's any way to know a priori to subset it at least some beforehand that would be a_good_thing (tm) but not mandatory. Then evaluate the result over the same fitted range, compute the residuals and as IA says, find the smallest group. You could then selectively refit those to improve the fit w/o the others polluting the estimates.
See
doc polyfit % and friends for more details
Kategorien
Mehr zu Surface and Mesh Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!