function pr = getPrice(starthour, startday, startmonth, days)
% Imports price.csv then extracts the 24 hour price estimate for a given
% number of days. 
%
%Arguments:
% starthour  = delay from 00:00 to start reading data for first date
% startday   = day of the month to start reading data 
% startmonth = month to start reading data
% days       = number of days to extract profiles from
%
%Output:
% pr        = electricity price profile for the given dates

clc
dayspermonth= [0,31,28,31,30,31,30,31,31,30,31,30,31]; % 0 for siplicity
datalength  = (24*days)     ;                    % 24 datapoints per day
startp = starthour + 24*((sum(dayspermonth(1:startmonth))) + startday-1);
endp   = startp + datalength;
% having 0 as the first entry in dayspermonth simplifies the startp-
% formula.

csv_data = csvread('price.csv',startp,0,[startp,0,endp-1,0]);
bar = ones(60,1);         % used to trasnform data from hours to minutes
pr = csv_data(1);               % adding start point (used in timeseries)
for i=1:1:datalength;     % transforming to same time scale as other data
    temp   = csv_data(i).*bar;
    pr = [pr; temp];
end
end