Azzera filtri
Azzera filtri

Issues with importdata function

1 visualizzazione (ultimi 30 giorni)
Andreas Westergaard
Andreas Westergaard il 13 Nov 2012
Hi. I have a number of tab-delimited ascii files with 3 lines of header:
xcoord: 1234 ycoord: 1235 data_sf 34 53 64 36 15 135 235 25 25 43
I want to import the files and do some calculations on the data without affecting the header. I therefor used the "importdata" function, with added info about the ascii-files:
result=importdata(filename,'\t',3)
which resulted in a 1x1 struct describing the matrix size and data type of data and textdata respectively. How do I access the data? If I import the ascii-file manually via the File->Import Data wizard, I get a variable named data and textdata in my workspace window. How can I get that with the importdata-function? Thanks in advance for inputs
  1 Commento
Andreas Westergaard
Andreas Westergaard il 13 Nov 2012
Ah, I had to extract the right matrix from the struct. So I had to write:
result=importdata(filename.data, '\t',3)
problem solved

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Data Import and Analysis 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!

Translated by