フィルターのクリア

Finding corresponding interpolated x values for defined y values

1 回表示 (過去 30 日間)
Susan
Susan 2011 年 11 月 3 日
Hi all,
I have obtained data and plotted it. I then interpolated it via spline interpolation and everything works fine. However, I would like to obtain precise values for the t2 (i.e. the interpolated x values) coordinates at say 10%, 20%, 30% etc., of the maximum y2 (i.e. interpolated y values) value.
The answer I obtain is
ans =
Empty matrix: 1-by-0
Please see the code below. I hope you can help.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
x = KE_data(:,1);
y = KE_data(:,2);
t2 = -20.5005:0.00002457:-20.2548;
y2=interp1(x,y,t2);
max_y2 = 0.1*max(y2);
t2((y2==max_y2))

採用された回答

Walter Roberson
Walter Roberson 2011 年 11 月 3 日

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by