I have been working on a side project for the past few weeks. I am analyzing a stock ticker (CHK) and I have plotted it into a figure using created 5 commands that import the data, convert the Excel serial dates into matlab serial dates, and plot. I want to automate this whole process using one command, i.e. importspreadsheet so I can do this for multiple stocks. How do I go about doing that?
Here are my commands:
importfile('chk.xls'); cDate = Date; cDate = x2mdate(cDate, 0); str = datestr(cDate, 1); cDt = cellstr( str ); plot(cDate,DeltaP,'DisplayName','cDate vs. DeltaP','XDataSource','cDate','YDataSource','DeltaP');figure(gcf)plot(cDate,DeltaV,'DisplayName','cDate vs. DeltaV','XDataSource','cDate','YDataSource','DeltaV');figure(gcf)plot(cDate,Volume,'DisplayName','cDate vs. Volume','XDataSource','cDate','YDataSource','Volume');figure(gcf)
Thanks!
Best Answer