From: M Ayache on 10 Aug 2010 19:22 I have a file (available at http://www.sendspace.com/file/2p32dz) which is basically a table of data with column headers, pretty simple. It is all tab-delimited, including the headers. I am using the importdata command in R2009a to read the file. The numerical data comes out fine, separated into different matrix columns as it's supposed to. Unfortunately, the headers just get jumbled into the 'textdata' field of the structure. My understanding is if the headers are delimited in the same way as the data, they should get separated into the field 'colheaders', which should sort each one separately as an array element. However, my structure doesn't contain 'colheaders', just 'data' and 'textdata'. This is true even if I write the command: importdata(filename,'\t',1) Any thoughts on why this happens and how I can fix it? If you'd like to test, you can download the file at the above url. I've removed a lot of the data because normally it's a huge file, but this should work for testing or examination purposes. Thanks.
From: us on 10 Aug 2010 21:05 "M Ayache" <mayache1213(a)yahoo.com> wrote in message <i3smvd$e5q$1(a)fred.mathworks.com>... > I have a file (available at http://www.sendspace.com/file/2p32dz) which is basically a table of data with column headers, pretty simple. It is all tab-delimited, including the headers. I am using the importdata command in R2009a to read the file. The numerical data comes out fine, separated into different matrix columns as it's supposed to. > > Unfortunately, the headers just get jumbled into the 'textdata' field of the structure. no problem with your exemplary file in ML 2010a... what do you mean by ...jumbled into the... how ...exactly... does your output look like... us
From: M Ayache on 10 Aug 2010 21:22 Heh, never mind, I just solved it. If you look at the file there is an extra tab in the headers line right before the carriage return. Deleting this tab fixes the column headers issue.
|
Pages: 1 Prev: ALL Solution Manuals & Test Banks Are Here! Next: boxplot help |