Filter löschen
Filter löschen

Issues with importdata function

1 Ansicht (letzte 30 Tage)
Andreas Westergaard
Andreas Westergaard am 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 Kommentar
Andreas Westergaard
Andreas Westergaard am 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

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Data Import and Analysis finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by