MATLAB: How to synchronize matrices (timeseries)

financestocksynchronizationtimeseries

May Somebody help me solve this problem?
I retrieved stock data from Yahoo and stored it in matrices, every matrix consists of 6 Columns (date,open,high,low,close,volume) and N time steps in the rows (daily).
conn = yahoo('http://download.finance.yahoo.com');
DBK=fetch(conn,'DBK.DE',{'Open', 'High', 'Low','Close','Volume'},'Jan 01 2005','Dec 31 2010', 'd')
DTE=fetch(conn,'DTE.DE',{'Open', 'High', 'Low','Close','Volume'},'Jan 01 2005','Dec 31 2010', 'd')
You will notice that both matrices do not have the same amount of rows DBK<1547×6>; DTE<1528×6>
Hence I cannot compare them, since there are some missing values in DTE. But since I got the date ID in column 1 of each matrix I would like to have the intersection between both matrices based on this ID. Can you help me? And is it possible to compute the intersection for more than 2 matrices?
Help is greatly appreciated!

Best Answer

That is exactly what I need, but I have to find the intersection between more than 2 matrices. :-( I tried to use the intersect() command iterative (intersection between A/B, B/C, C/D,…) but this doesn't really work.
Do you have another hint for me, please?
Related Question