%Written by Lucjan Janowski, 2009
%This function read a given trace file and returns a matrix where the
%firest column is nomalized time and the second column is packet length
%
%pointMatrix = pointProcessRead(name)
%INPUT
%   name            a trace file name
%OUTPUT
%   pointMatrix     a matrix where the firest column is nomalized time 
%                   and the second column is packet length

function pointMatrix = pointProcessRead(name)

if nargin<1;  
    error('To fiew arguments, you must give at last a file name\n');
end

command = sprintf('-o HEADER.timeS HEADER.timeUs Pi.Len -r %s -e', name);
Data = TracesPlay(command);

time = Data(1,:)-Data(1,1);
time = double(time) + double(Data(2,:))*10^-6; 
time = time - time(1);

pointMatrix = [time' double(Data(3,:))'];
