Curve fitting and scatter plots
Mostrar comentarios más antiguos
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 comentario
dpb
el 22 de Sept. de 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)
Respuesta aceptada
Más respuestas (2)
Image Analyst
el 22 de Sept. de 2013
0 votos
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
el 13 de Nov. de 2013
0 votos
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 comentarios
Image Analyst
el 13 de Nov. de 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
el 22 de Nov. de 2013
dpb
el 22 de Nov. de 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
Categorías
Más información sobre Lengths and Angles en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!