how to transform a time-serie data non uniform to uniform

2 ビュー (過去 30 日間)
Win co
Win co 2012 年 3 月 17 日
Hi everyone, I have a time-serie data as input of a system ex: day = [1 2 4 6 7 8 10 11 14 15 16 19 20 21 22 23 24 25 26 27 28 29 30] and an output with the same length. I would like to use these input and ouput vector to train an ANFIS (adaptive neuro-fuzzy inference system). The problem is the quantity of data as input is not enough for training so I want to make it uniform like that day = [1 2 3 4 5 6 7 8 9 ... 30] the data as output for additional days will be computed by interpolation Does anyone know whether it exists a command in Matlab to solve this problem ? Thanks

採用された回答

per isakson
per isakson 2012 年 3 月 17 日
Try this
day = [1 2 4 6 7 8 10 11 14 15 16 19 20 21 22 23 24 25 26 27 28 29 30];
y = rand( 1, numel(day) );
day_uni = (1:1:30);
y_uni = interp1( day, y, day_uni );
plot( day, y, 'd', day_uni, y_uni, '+' )
and lookup interp1 in the online help. There are several interpolation methods. Default is linear.
  1 件のコメント
Win co
Win co 2012 年 3 月 28 日
this is the great answer. thanks alot
Winn

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

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