Effacer les filtres
Effacer les filtres

Issues with importdata function

1 vue (au cours des 30 derniers jours)
Andreas Westergaard
Andreas Westergaard le 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 commentaire
Andreas Westergaard
Andreas Westergaard le 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

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Data Import and Analysis dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by