I have read Mf4 file using "vehicle network Toolbox", Now i want to convert this to other formats such as CSV/PCD

조회 수: 35 (최근 30일)
i have used this function of tool box to read data,
dataChanTable = mdfRead("VehicleData.mf4", Channel=chanInfo)
>> writetable(data, 'output.csv');
Error using writetable (line 21)
Type 'timetable' is not supported. Use writetimetable instead.

답변 (1개)

Sumukh
Sumukh 2024년 9월 27일
Hi Rajendra,
The “mdfRead” command reads the .MF4 file and outputs a cell array of timetables. To convert the output “dataChanTable” into .CSV file format, please follow the following steps:
  • The command “writetimetable” can be used to convert one timetable at a time in the cell array “dataChanTable” into .CSV format. You can use the following command:
writetimetable(dataChanTable{1},output.csv) % 1 can be replaced by required index of timetable.
  • To convert multiple timetables into multiple .CSV files, you can use the following for-loop to loop through the timetables and create distinct .CSV files:
for i = 1:length(dataChanTable)
filename = sprintf('output_%d.csv', i);
writetimetable(dataChanTable{i}, filename);
end
You can refer to the following documentation to know more about the “writetimetable” command:
.PCD files are point cloud files representing the coordinates of data-points in 3-D space. It is irrelevant to convert the given data into point cloud files.
I hope this answers the query.

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by