Casestudie Breakdown prediction Contell PILOT - Transumo
Casestudie Breakdown prediction Contell PILOT - Transumo
Casestudie Breakdown prediction Contell PILOT - Transumo
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
%Name and location of the source file<br />
unit = 1;<br />
filename = strcat('Channel', int2str(unit), '.csv');<br />
path = 'C:\Dokumente und Einstellungen\Christian\Eigene<br />
Dateien\Dokumente\Studium\Diplomarbeit\Monitoring Data Nijmegen<br />
(Converted)\';<br />
%Import Dataset<br />
import = importdata(strcat(path, filename));<br />
%If Doorsensor is not available, add a 0 column (for compatibility reasons)<br />
if length(import.data(1,:)) == 5;<br />
import.data(:,6) = 0;<br />
disp('No Doorsensor installed! => Column added');<br />
end<br />
%Create Datevector (as serial date number):<br />
date = datenum(import.textdata(:,1), 'dd-mm-yy HH:MM:SS');<br />
%Algorithm for interpolation<br />
%Definition of a second<br />
second = 1/(60*60*24);<br />
%Definition of a minute (for performance reasons)<br />
minute = 1/(60*24);<br />
%Current position within import-vector<br />
position = 1;<br />
%Length of the data-vector (for performance reasons)<br />
datalength = length(import.data(:,2));<br />
%New Matrix for the interpolated data: (Contains: Date/Time, Interpolated<br />
Temperature, Lower Border, Upper Border)<br />
ID = [];<br />
%next save positions (see below)<br />
saveposition = 250;<br />
disp(strcat('Start of Computation:_', datestr(now)));<br />
%Initialise time to first complete minute of imported data and the starting<br />
position;<br />
starttime = (date(position) - mod(date(position),minute)) + minute;<br />
while date(position + 1)