Hi,
I am trying to find multiple values for the same y value of this plot.
xDesired = interp1(xdata,ydata, 9.15986);
I tried to use interp1, but as you can see there are multiple values for 9.15986 and interp1 only prints one. How can I print all of them?

回答 (1 件)

Star Strider
Star Strider 2020 年 11 月 14 日

0 投票

Use either islocalmax and islocalmin, or findpeaks (on the positive and negative of the dependent variable) to identify the peaks and valleys. Then locate those values and interpolate between the maxima and minima for the various sections.

カテゴリ

ヘルプ センター および File Exchange で Interpolation についてさらに検索

質問済み:

2020 年 11 月 14 日

回答済み:

2020 年 11 月 14 日

Community Treasure Hunt

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

Start Hunting!

Translated by