29.09.2014 Views

Casestudie Breakdown prediction Contell PILOT - Transumo

Casestudie Breakdown prediction Contell PILOT - Transumo

Casestudie Breakdown prediction Contell PILOT - Transumo

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

xlswrite(strcat(path, 'Excel\', filename, '- Median'),<br />

[interpolateddailydate-693960, round(medianvector*10)/10,<br />

round(mediandaytime*10)/10, round(mediannighttime*10)/10], 'Median', 'A2');<br />

xlswrite(strcat(path, 'Excel\', filename, '- Mode'),<br />

[interpolateddailydate-693960, round(modevector*10)/10,<br />

round(modedaytime*10)/10, round(modenighttime*10)/10], 'Mode', 'A2');<br />

xlswrite(strcat(path, 'Excel\', filename, '- Standard Deviation'),<br />

[interpolateddailydate-693960, round(stdvector*10)/10,<br />

round(stddaytime*10)/10, round(stdnighttime*10)/10], 'Standard Deviation',<br />

'A2');<br />

xlswrite(strcat(path, 'Excel\', filename, '- Doordopenings'),<br />

[interpolateddailydate-693960, dailydooropenings, daytimedooropenings,<br />

nighttimedooropenings], 'Dooropenings', 'A2');<br />

%Total Values<br />

totalmean = mean(interpolation(:,2));<br />

totalmedian = median(interpolation(:,2));<br />

totalmode = mode(interpolation(:,2));<br />

totalstd = std(interpolation(:,2));<br />

totaldooropenings = sum(interpolation(:,3));<br />

%-----Temperature Distribution-----<br />

%Count total occurrences of single values<br />

%"Round" Command necessary in MATLAB. Otherwise some comparisons fail!<br />

%Contains[Temperature, Minutes of Occurence]<br />

totalOC = [];<br />

for i = min(interpolation(:,2)):0.1:max(interpolation(:,2));<br />

totalOC = [totalOC; [i, sum(interpolation(:,2) == round(i*10)/10)]];<br />

end<br />

%-----Plot Statements-----<br />

%Temperature Overview<br />

plot(date, import.data(:,2), 'k');<br />

hold on;<br />

plot(interpolation(:,1), interpolation(:,4), '--b')<br />

plot(interpolation(:,1), interpolation(:,5), '--r')<br />

datetick('x',20, 'keeplimits');<br />

title 'Temperature Overview';<br />

xlabel 'Date';<br />

ylabel 'Temperature (°C)';<br />

axis([min(date) max(date) min(import.data(:,2)) max(import.data(:,2))]);<br />

hold off;<br />

print('-dtiff', strcat(path, 'Graphs\', filename, '- Temperature<br />

Overview.tif'));<br />

%Maximum Values per Day<br />

bar([dailydate(1):dailydate(length(maxvector))], maxvector, 'k');<br />

hold on;<br />

plot(interpolation(:,1), interpolation(:,4), '--b')<br />

plot(interpolation(:,1), interpolation(:,5), '--r')<br />

datetick('x',20, 'keeplimits');<br />

title 'Maximum Values per Day';<br />

xlabel 'Date';<br />

ylabel 'Temperature (°C)';<br />

axis([dailydate(1) dailydate(length(maxvector)) min(maxvector)<br />

max(maxvector)]);<br />

A-121

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!