Having trouble importing data from LABVIEW to MATLAB
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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.
0 Commenti
Risposte (1)
Star Strider
il 20 Gen 2016
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 Commenti
Walter Roberson
il 21 Gen 2016
We are not qualified to answer questions about Octave here. Octave questions should be asked in the Octave forums.
Star Strider
il 21 Gen 2016
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.
Vedere anche
Categorie
Scopri di più su Data Type Conversion in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!