Import .csv file into Matlab
Show older comments
Hi all,
I'm having troubles importing headers with their data into Matlab. Anyone have a good idea? .csv file looks like this;
(The headers) 12077_1330-CAN2L T;DATE;TIME;MS;TYPE;EXTRA;FrontAxleSpeed [km/h];AEBS1_AEBSstate;GrossCombinationVehicleWeight [kg];BarometricPress [kPa];PredictiveCruiseCtrlSetSpdOffset [km/h];CruiseCtrlActive;CruiseCtrlSetSwitch;PredictiveCruiseCtlEventInd;EngRedStopLampCmd;EngAmberWarningLampCmd;OBDMalfunctionIndicatorLampCmd;SystemEvent;VehicleOverspeed;TirePressureThresholdDetection;PredictiveCruiseCtrlState;ForwardCollisionWarning;BrakePedalPos [%];DrivingMode [State];ServiceBrakeCircuit1AirPress [kPa];ServiceBrakeCircuit2AirPress [kPa];HghRslutionTotalVehicleDistance [km];VhclAccelerationRateLimitStatus;AccelPedal1LowIdleSwitch;AccelPedalKickdownSwitch;AccelPedalPos1 [%];Aftrtratment1ExhaustGasMassFlow [kg/h];EngTurbo1TurbineOutletTemp [deg C];EngTurbo1TurbineIntakeTemp [deg C];EngTurbo1CompressorIntakePress [kPa];EngIntakeManifold1AbsPress [kPa];EngExhaustGasTemp [deg C];EngChargeAirCooler1OutletTemp [deg C];EngVrblGometryTurbo1ActuatorPos [%];EngExhaustGasRecirculation1Temp [deg C];EngTurbo1Speed [rpm];CmdedEngFuelRailPress [MPa];EngThrottleValve1Pos [%];EngVrableGeometryTurboActuator1 [%];EngExhstGsRcrculation1ValveCtrl [%];EngFuelDeliveryPress [kPa];EngExhstGsRcirculation1ValvePos [%];EngTotalHoursOfOperation [hr];EngIntakeAirMassFlowRate [kg/h];EngExhstGsRcrclton1MassFlowRate [kg/h];EngTurbo1CompressorIntakeTemp [deg C];EngExhaustGasPress [kPa];EngOilPress [kPa];EngTurbo1CompressorOutletTemp [deg C];BatteryPotential_PowerInput1 [V];AmbientAirTemp [deg C];DownhillSpeedCtrlSetSpeed_Msb [kph];Aftrtrtmnt1SCRCatalystTankLevel [%];EngIntakeManifold1Press [kPa];EngIntakeManifold1Temp [deg C];ClutchSwitch;EngCoolantTemp [deg C];EngFuelTemp1 [deg C];EngOilTemp1 [deg C];TransCurrentGear;TachographVehicleSpeed [km/h];EngFuelRate [L/h];EngTotalFuelUsed [L];ActualEngPercentTorque [%];EngSpeed [rpm];Free_Card_Size [MByte];GPS_Hundredths;GPS_Second;GPS_Minute;GPS_Hour;GPS_Year;GPS_Month;GPS_Day;Speed_kmh [km/h];Altitude [m];Latitude [deg];Longitude [deg];Valid_Fix;Satellites;CAN4_Bus_Load [%];CAN3_Bus_Load [%];CAN2_Bus_Load [%];CAN1_Bus_Load [%];CPU_Load [%]
(The data) 1.000000;15.10.2015;10:20:46;000.000;D;;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;2040;2040;337024.6;0;0;0;0;0;-273;-273;-250;0;-273;-273;0;-273;0;0;0;0;0;0;0;0;0;0;-273;-250;0;-273;0;-273;0;0;0;-40;0;-40;-40;-273;130;0;0;0;-125;0;0;0;0;0;0;0;0;0;0;-21474.836;-214.74836;-214.74836;0;0;0;0;0;0;30.4 2.000000;15.10.2015;10:20:47;000.000;D;;0;15;0;101;0;0;0;0;0;0;1;0;0;3;0;0;0;0;944;944;337024.6;0;1;0;0;0;181.59375;155.6875;101.09375;5;181;20.5;0;40.6875;0;0;0;80;0;8;0;5805.85;0;0;20;0;40;-243.71875;25.45;20;0;102;0;40;3;72;32;69.875;0;0;0;104884;0;0;9983.604;25;56;18;8;15;10;15;0.12038;48.8;51.086797;6.8189915;1;8;0;34;48;22;27.2 3.000000;15.10.2015;10:20:48;000.000;D;;0;15;0;101;0;0;0;0;0;0;1;0;0;2;0;0;0;0;944;944;337024.6;0;1;0;0;0;181.6875;172;101.5;5;181.78125;20.59375;0;40.6875;0;0;0;80;0;8;0;5805.85;0;0;15;0;40;-209.5;25.4;3.28125;0;75.2;0;40;3;73;33;70;0;0;0;104884;0;0;9983.584;25;57;18;8;15;10;15;0.01852;48.9;51.086798;6.818991;1;8;7;37;47;21;36.2 4.000000;15.10.2015;10:20:49;000.000;D;;0;15;0;101;0;0;0;0;0;0;1;0;0;2;0;0;0;0;944;944;337024.6;0;1;0;0;0;181.375;178;101.5;5;181;20.6875;0;41.09375;0;0;0;80;0;8;0;5805.85;0;0;15;0;40;-180
Answers (1)
Yuebin Zhou
on 25 Nov 2015
Edited: Yuebin Zhou
on 25 Nov 2015
0 votes
You can use 'Import tool' to select data interactively. Check the link below for more details
Categories
Find more on Workspace Variables and MAT Files in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!