Reputation: 598
I am attempting to do some analysis on a series of timetable
objects. Each has a potentially different date range (they represent observations of a time series). I would like to pass this array of timetable
objects into a function.
Using the quandl
addon:
>> conn = quandl(<YOUR_API_KEY_HERE>);
>> z1 = history(conn, 'ZILLOW/M1300_MPPRSF');
>> z2 = history(conn, 'ZILLOW/M1300_MPPRAH');
Then attempting to take these two time series and group them into an array (NOT join them together):
>> [z1, z2]
Duplicate table variable name: 'Value'.
Is there a method to do this such that I could save a number of timetables
into a vector so that I can iterate over them without using varargin
in the function?
Thank you.
Upvotes: 0
Views: 1192
Reputation: 123
One option would be to create a cell array of the timetables and then use a cellfun
to perform your analysis. For example, if you would like to perform the lag
calculation on the timetables, you could do the following:
myData = {z1, z2};
myLags cellfun(@lag, myArray);
Upvotes: 0