compare two or more time series of data and eliminate the elements which do not have the same date
[S]=cfr(S1,S2[,S3,S4,...]);
Compare time series and make them homogeneous with respect to the dates (by eliminating the elements which do not have the same date)
two column matrix: the first column must be a list of dates, while the second column must contain data
two column matrix: the first column must be a list of dates, while the second column must contain data
First we create two time series with the following commands
-->S1=[datenum(2010*ones(10,1),ones(10,1),[1:10]') [1:10]']
S1 = 734139. 1.
734140. 2.
734141. 3.
734142. 4.
734143. 5.
734144. 6.
734145. 7.
734146. 8.
734147. 9.
734148. 10.
-->S2=[datenum(2010*ones(5,1),ones(5,1),[1:2:10]') [1:2:10]'*5+4]
S2 = 734139. 9.
734141. 19.
734143. 29.
734145. 39.
734147. 49.
Then we use the function for selecting, from these time series, only the data which compare in both of them
-->S=cfr(S1,S2)
S = 734139. 1. 9.
734141. 3. 19.
734143. 5. 29.
734145. 7. 39.
734147. 9. 49.
Francesco Menoncin - Brescia University - 2010