i trying load quarterly data federal reserve, economic data (fred) matlab (actually octave, shouldn't make difference right?).
the problem fred lists quarterly dates in different way, e.g. 2013 q2 is: 2013-04-01
when download data (excel only) , convert .csv, , load this, minuses interpreter new colums. end year, -month, , -1 column.
what way convert quarters matlab/octave?
you can specify format in date strings handled in matlab. example if xlsread
reads date 'yyyy-mm-dd' string, seems case in fred:
datestr1 = '2013-04-01'; date1 = datenum(datestr1,'yyyy-mm-dd');
and if wish display date in 'yyyy qq' format use datestr(date1,'yyyy qq')
conversely,
datestr2 = '2013 q2'; date2 = datenum(datestr2,'yyyy qq');
Comments
Post a Comment