Fitting line to a curve
1 回表示 (過去 30 日間)
古いコメントを表示
I have a plot of attenuation V frequency and I am wondering if there is a way I can fit a straight line the follows the upper trajectory of the graph, so that you would see the line increase and then level off. I have tried a few methods but getting lines through the middle etc. Many Thanks
3 件のコメント
採用された回答
John D'Errico
2022 年 4 月 21 日
Easy.
- Use findpeaks, to locate the sequence of points that represent the successive maxima of the curve.
- Use an interpolating spline to then interpolate those points. A tool like interp1 will be simplest. Specify the 'pchip' option.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Interpolation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!