How to get full day data from time sample

1 回表示 (過去 30 日間)
rabih Al Ahmadieh
rabih Al Ahmadieh 2015 年 10 月 9 日
コメント済み: Star Strider 2015 年 10 月 9 日
Hi if I have data like [1 2 3 4 5] at time [1 5 12 15 19] how can I get for example the data at time 2 or 3 or even 24. I tried to plot a graph but could not get the data out from the graph because the xdata and ydata will be similar to the input points. If you can help I would appreciate it. Thank you,

採用された回答

Star Strider
Star Strider 2015 年 10 月 9 日
I would use the interp1 function:
time = [1 5 12 15 19];
data = [1 2 3 4 5];
new_data = interp1(time, data, [2 3 24], 'linear', 'extrap');
  2 件のコメント
rabih Al Ahmadieh
rabih Al Ahmadieh 2015 年 10 月 9 日
Thank you very much
Star Strider
Star Strider 2015 年 10 月 9 日
My pleasure.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Object Identification についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by