function oxj = TECFunc_ReadDataCSV(type)
  % Reading data from csv
  [filenameXj, filenameTau, filenameCon, ~, tstart, tend] = TECFunc_ArchiveName(type);
  Xj      = dlmread(filenameXj , ',',0,0);
  Tau     = dlmread(filenameTau, ',',0,0);
  Control = dlmread(filenameCon, ',',0,0);
  
  % resample of the signal 
  [~, ~, ~, ~, ~, ~, ~, ~, ~, ~, ts, trs, accMax, decMax, steerGain] = TECFunc_VehicleParameters();
  idx = 1:trs/ts:numel(Xj(:,1));
  idx = tstart:trs/ts:tend;
  
  % Output
  oxj.t     = Xj(idx,1);
  oxj.x     = Xj(idx,2);
  oxj.y     = Xj(idx,3);
  oxj.psi   = Xj(idx,4);
  oxj.vx    = Xj(idx,5);
  oxj.vy    = Xj(idx,6);
  oxj.w     = Xj(idx,7);
  oxj.ax    = Xj(idx,8);
  oxj.ay    = Xj(idx,9);
  oxj.delta = -Control(idx,1)*steerGain*(pi/180);
  oxj.acc   = Control(idx,2)*accMax - Control(idx,3)*decMax;
end

