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)?

 채택된 답변

Conrad
Conrad 2013년 2월 11일

2 개 추천

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

추가 답변 (1개)

Youssef  Khmou
Youssef Khmou 2013년 2월 11일

1 개 추천

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

카테고리

도움말 센터File Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

제품

태그

질문:

2013년 2월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by