Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'Import .txt file as row vector' topicStudent Support Forum > General > "Import .txt file as row vector"

Next Comment >Help | Reply To Topic
Author Comment/Response
12/19/11 2:18pm

I have .txt files that contain one column of data that I would like to import for use in Mathematica. I am able to import these files with the following code:
target1 =
Take[Import[path1 <> FileNameJoin[{"/FILTERS", "mulinearFAT.txt"}],
"Table"], steps];
The imported data looks like this:
target1 = {{16873.9}, {2397.14}, {782.087}, {344.054}, {179.726}, {105.029},{66.4013}}.

I would like this entry to be a row vector of 7 values, but when I do the transpose of target1, Mathematica is grouping all the values into one entry such that the Length[Transpose[target1]] = 1.

How can I get Mathematic to recognize all the entires in this variable during a transpose?

URL: ,

Subject (listing for 'Import .txt file as row vector')
Author Date Posted
Import .txt file as row vector Kim 12/19/11 2:18pm
Re: Import .txt file as row vector Bill Simpson 01/21/12 02:58am
Next Comment >Help | Reply To Topic