sorting a time series

Hello,
II have a time series Yt and I sorted them in ascending order and I got Yi, then I used them in a function and I got Zi as Zi=F(Yi), How can I rearrange Zi to Zt (the same order of Yt)?

 Respuesta aceptada

Conrad
Conrad el 11 de Feb. de 2013

2 votos

You need to use the optional output from the sort function that contains the sort order.
[Y, idx] = sort(time_series);
Zt = Zi(idx);

Más respuestas (1)

Youssef  Khmou
Youssef Khmou el 11 de Feb. de 2013

1 voto

hi, you apply directly the function Zt=F(Yt) as :
(Yt,Yi) =>: F(Yt,Yi)=(Zt,Zi)

Categorías

Productos

Etiquetas

Preguntada:

el 11 de Feb. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by