I have a m
xn
financial time series object (fints) called data
. Now I'd like to merge each of its n
series into a new fints by keeping only the intersecting dates (the series headers are all unique).
Here's what I do:
headers = fieldnames(data,1); %get the headers.
series = strcat('data.', headers); %list of the series to be merged.
new_fints = merge(series{:},... %merge the series.
'DateSetMethod','Intersection');
But this gives me the following error: Undefined function 'merge' for input arguments of type 'char'.
What's wrong with my comma-separated list?