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

6 visualizaciones (últimos 30 días)
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

Respuesta aceptada

per isakson
per isakson el 17 de Mzo. de 2012
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.

Más respuestas (0)

Categorías

Más información sobre Fuzzy Logic Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by