I am trying to create a schedule task that reads in a excel file and saves the data. It's working, but when I try to save new data with the same variable name, it overwrites even when I use the '-append' function.
read_date = (datestr(busdate(today)-4,'mmddyyyy'));
cd('C:\Users\jdoe\Desktop\weathertemps');
csvdata = xlsread(strcat('temp_', num2str(read_date),'.XLS'));
htemp = [csvdata(1,5),csvdata(2,5),csvdata(3,5),csvdata(4,5)];
ltemp = [csvdata(7,5),csvdata(8,5),csvdata(9,5),csvdata(10,5)];
todaydata = [str2num(read_date),htemp,ltemp];
cd('C:\Users\jdoe\Desktop\weathertemps\Data');
save mydata.mat todaydata -append;
This saves a vector<1,9> called todaydata in a mat file called mydata.mat. How do I go back into that same vector and make it an array of <2,9> with next day's data?