%finds average price per hourly slot from one year of price data
function avPrice = historicPrice
fulldata = csvread('price.csv',0,0,[0,0,8759,0]);    %read price data
temp = zeros([365,24]);     % create empty matrix for hourly datasets
for j=1:days 
    for i=1:1:24                     % for each hourly period per day
        temp(j,i) = fulldata(24*(j-1)+i);% append data to hourly slot
    end
end
ad = sum(temp)./365;              % divide sum by days to get average
avPrice = [ad(5:end),ad(1:4)];     % time shifted to start at 4.00 AM