Curve fitting and scatter plots
古いコメントを表示
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 件のコメント
dpb
2013 年 9 月 22 日
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)
採用された回答
その他の回答 (2 件)
Image Analyst
2013 年 9 月 22 日
0 投票
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
2013 年 11 月 13 日
0 投票
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 件のコメント
Image Analyst
2013 年 11 月 13 日
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
2013 年 11 月 22 日
dpb
2013 年 11 月 22 日
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
カテゴリ
ヘルプ センター および File Exchange で Lengths and Angles についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!