How to import .par file

63 Ansichten (letzte 30 Tage)
Sai Gudlur
Sai Gudlur am 21 Aug. 2023
Bearbeitet: Sai Gudlur am 22 Aug. 2023
Hello,
I am trying to import .PAR an output of Vector Canape (Software used in Automotive Calibration).
If I use Import Data under Home I am able to import data as MATLAB when I use the same after UIgetfile it wouldn't get all the rows of data. have used delimiters options as well.
Also tried importing using detectimportsoptions with filetypes and delimiters still cannot get all data into the workspace.
I have attached screenshots of them. Capture (is when using import data button under home). Capture_1 is when using code.
Forum isn't allowing me to add the file as the format is not supported.
Any help/suggestion is appreciated.
Thank you
[filename,pathname]= uigetfile({'*.*','All Files (*.*)'});
Fullfilename_1 = importdata(fullfile(pathname,filename));
  4 Kommentare
dpb
dpb am 22 Aug. 2023
Use @doc:readcell; the form isn't conducive to other forms.
Then you'll have to parse it to return the variables, descriptions and data on a line-by-line basis.
The input form is also bizarre in that there are variables with indicated types "[FLOAT}" , "[UINT8]", etc., with a value and then ";" and another value, are both values significant? More often than not (but not always), the two values are the same.
Then, there are what appear to be arrays with a size argument
C_Diag_CluPositionInstantDM [UINT(32),(1,2)]
: 0 ; 0
: 1024 ; 1024
but the number of data elements doesn't match the descriptor. Whassup with that???
Going to need quite a lot of explanation of what are looking at and what, specifically, it is that are trying to import and how you think you've going to use this in MATLAB.
Sai Gudlur
Sai Gudlur am 22 Aug. 2023
Bearbeitet: Sai Gudlur am 22 Aug. 2023
Hello dpb & Stephen23,
I used the below code and it worked. I wasn't sure, pretty much wanted to try every option availble and this worked in my favor. Thank you everyone. Also attached screenshot of the data types how it extracted.
A=readtable("C:\Users\gudlu\OneDrive\Documents\Matlab\NGHD_E336.e006.p000_Navistar_X15_ModeAB_12Spd_C3_1_Modified.par","FileType","text");
B = A.Var1(5:end,:);
C = A.Var2(5:end,:);

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Produkte


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by