필터 지우기
필터 지우기

text to excel for GRIMM data

조회 수: 3 (최근 30일)
AMIT SINGH CHANDEL
AMIT SINGH CHANDEL 2023년 6월 18일
댓글: AMIT SINGH CHANDEL 2023년 9월 11일
I have a following data, of GRIMM instrument (11D model). The output text file is very complex. I want to convert into an excel file so that i can proceed with the visualization of data.
One file is attached here for the reference.
  댓글 수: 4
AMIT SINGH CHANDEL
AMIT SINGH CHANDEL 2023년 9월 9일
Still waiting for an expert to help in this regard
dpb
dpb 2023년 9월 9일
편집: dpb 2023년 9월 10일
You been just sitting since June for somebody else to do your work for you????
You haven't supplied enough specifics about what you really want/need to provide exact code; what, specifically would you expect an output file/dataset to look like?
There's some confusion about the file content itself...what are the header columns and how do they relate to the records without that many values?
There are sets of four 8-valued records, but they're not labelled consistently; what's the difference between upper and lower case C0 and c0 -- or is it just some anomaly/error in the file construction? And, is there any significance to the the trailing ":" vis a vis ";"?
Then, it starts off with a P, K, P, then a different sequence following P; whassup with that? Not to mention what may be a date/time stamp(?) in the P record initially has _23 whereas is 23 in the rest...such anomalies add to the difficulties in parsing, but it's essentially impossible without knowing what it is that are looking at and what is expected.
Basically, in such cases, one has to read the data by record and parse/rearrange it into the desired format
ADDENDUM: I intended to add, if this file is output by some commercial package, see the vendor's website for tools to read the output file. Oftentimes (at least with the major vendors) there is a MATLAB version already. Or, you may have the option to mex a C function.

댓글을 달려면 로그인하십시오.

답변 (1개)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2023년 9월 10일
There are a few good MATLAB functions that can be employed to import your data into MATLAB and then export into MS Excel (.xls, xlsx or .csv) format.
For data import: readtable(), dlmread(), textscan(), etc.
For data export: writetable(), writematrix(), xlswrite(), etc.
  댓글 수: 2
dpb
dpb 2023년 9월 10일
편집: dpb 2023년 9월 10일
The problem here isn't the reading, it's the parsing of what has been read to make something useful out of it to write...and there are too many imponderables w/o more input from the OP as to what stuff really is and how/what intends/needs to do with it to take time first...
AMIT SINGH CHANDEL
AMIT SINGH CHANDEL 2023년 9월 11일
Thank you, I got the way to arrange the data in desired manner.

댓글을 달려면 로그인하십시오.

카테고리

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

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by