how to transform a time-serie data non uniform to uniform
6 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
采纳的回答
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.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Fuzzy Logic Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!