フィルターのクリア

interpolation function returns NANs

14 ビュー (過去 30 日間)
Yasmin Tamimi
Yasmin Tamimi 2013 年 12 月 25 日
編集済み: Yasmin Tamimi 2013 年 12 月 25 日
Hey everyone,
I'm using interpolation function to create the following "I":
pulse_height = 500E-6;
pulse_len = 1E-9;
t_rise = 50E-12;
t_sim = 20E-9;
t_step = 10E-12;
t_pulse = [0, t_rise, t_rise+pulse_len, 2*t_rise+pulse_len];
I_pulse = [0, pulse_height, pulse_height, 0];
for j = 0:t_step:t_sim;
I = interp1(t_pulse, I_pulse, j);
end
and I end up having "I" as NAN!!

採用された回答

Walter Roberson
Walter Roberson 2013 年 12 月 25 日
You did not happen to show the values of t_step or t_sim
You would get NaN if you tried to interpolate outside the time range given in t_pulse
  1 件のコメント
Yasmin Tamimi
Yasmin Tamimi 2013 年 12 月 25 日
編集済み: Yasmin Tamimi 2013 年 12 月 25 日
Great! Thanks.

サインインしてコメントする。

その他の回答 (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