datatable - Matlab struct computations -
i download data yahoo! finance with:
data = getyahoodailydata({'msft', 'axp'},'01/01/2000', '01/01/2015', 'dd/mm/yyyy');
and data stored 1x1
struct. want create tx2
matrix of daily adjusted closing prices msft , axp, column 7 in each table in struct.
how can that?
or better: there way make computations directly on information/prices in struct?
you can access data in struct name.
vecmsftadj = data.msft.adjclose; vecaxpadj = data.axp.adjclose; % if want n x 2 matrix madjclose = [vecmsftadj, vecaxpadj]; % personnaly prefer working table tadjclose = table; tadjclose.msftadj = vecmsftadj; tadjclose.axpadj = vecaxpadj;
Comments
Post a Comment