Discretise into Equal Intervals
古いコメントを表示
I have an array of data, 2 columns and 19 rows of entries, which can be plotted as a loglog curve. However, the x-data I have does not have standard intervals and I need to approximate the curve as a piecewise linear function. Any suggestions as to how to go about this?
6 件のコメント
Bruno Pop-Stefanov
2014 年 1 月 21 日
Do you mean that the x-data is not aligned with your (2-by-19) array of data?
simply90
2014 年 1 月 21 日
Bruno Pop-Stefanov
2014 年 1 月 21 日
So you would like to interpolate the values of the curve at regularly-spaced points?
dpb
2014 年 1 月 21 日
What, precisely do you mean by "discretize over equal intervals"? If you mean to interpolate to a uniform (and is this uniform on linear or log axis) interval, just apply interp1 finding a new y for the chosen set of x on the log- or linear-spacing. Of course, by your description the fit is linear only in log-log so you'll want to transform first.
After that it should be relatively straightforward to choose breakpoints -- fit segments and move the breakpoint to minimize R-sq or max residual or whatever chosen criterion is.
simply90
2014 年 1 月 21 日
simply90
2014 年 1 月 21 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Surface and Mesh Plots についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!