필터 지우기
필터 지우기

Fitting line to a curve

조회 수: 2 (최근 30일)
David Harra
David Harra 2022년 4월 21일
편집: Matt J 2022년 4월 22일
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
David Harra
David Harra 2022년 4월 21일
Thanks I will keep this in mind for future. How do I include my data as a .mat file?
Dave :)
Matt J
Matt J 2022년 4월 22일
편집: Matt J 2022년 4월 22일
The toolbar has a a file attachment option.

댓글을 달려면 로그인하십시오.

채택된 답변

John D'Errico
John D'Errico 2022년 4월 21일
Easy.
  1. Use findpeaks, to locate the sequence of points that represent the successive maxima of the curve.
  2. Use an interpolating spline to then interpolate those points. A tool like interp1 will be simplest. Specify the 'pchip' option.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

태그

제품


릴리스

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by