Having trouble importing data from LABVIEW to MATLAB

조회 수: 8 (최근 30일)
Nicholas  Frank
Nicholas Frank 2016년 1월 20일
댓글: Star Strider 2016년 1월 21일
I'm attempting to import data from labview to MATLAB for analysis. I can't figure out which import function to use and I could use some help. I've attached the type of data that I will regularly come into contact with. The raw data leaves the software with absolutely no extension. On my computer, which has a windows 7 operating system, they denote the type of file extension as "File" and I think this may be the source of why I'm having so much trouble. The attachment to this forum post is a ".txt" file (entirely because this forum will not allow me to upload the file as it is originally), but this is not how they come to me in raw format. I had to modify the file by simply attaching ".txt" when renaming the file. All in all, if it is possible to import the data in it's raw file form (i.e. "File" form) and without attaching ".txt" to every file I am interested in, that would be the best possible scenario.

답변 (1개)

Star Strider
Star Strider 2016년 1월 20일
I would use textscan:
fidi = fopen('Nicholas Frank 402-149 AD102-005rerun.txt','r');
Data = textscan(fidi, '%s%s%f%f', 'HeaderLines',6, 'Delimiter','\t', 'CollectOutput',1);
DateTimeC = Data{1};
DateTimeS = [char(DateTimeC(:,1)), repmat(' ', size(DateTimeC,1), 1) char(DateTimeC(:,2))]; % Date & Time As Strings
DateTimeN = datenum(DateTimeS, 'mm/dd/yyyy HH:MM:SS PM'); % Date & Time As Date Numbers
Sig_Temp = Data{2}; % Signal & Temperature Matrix
  댓글 수: 6
Walter Roberson
Walter Roberson 2016년 1월 21일
We are not qualified to answer questions about Octave here. Octave questions should be asked in the Octave forums.
Star Strider
Star Strider 2016년 1월 21일
It’s safe to say that if I’d known it was an Octave question, so that my Answer (and effort behind it) turned out to be irrelevant, I’d not have bothered. I quite definitely have better uses for my time.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by