f



reading in file with text and numbers to be able to access numbers

Hi. I am trying to read in a file that was created by another
application. The first two lines of this file are composed of text
that I don't need. Following are 100 lines of numbers that I do
need. Any idea on how to load this file without making an overly
specific script? The number of rows of numbers the other application
generates varies.

Thank you for any tips!
0
rosfjord (1)
4/4/2005 5:52:47 PM
comp.soft-sys.matlab 211266 articles. 22 followers. lunamoonmoon (257) is leader. Post Follow

1 Replies
686 Views

Similar Articles

[PageSpeed] 34

Look at the TEXTREAD function.  One of the options is 'headerlines', to 
tell it the number of lines to skip at the beginning of the file.  So 
you would do something like this:

n = textread('myfile.txt','%n','headerlines',2)

You may need to tweak the format string or some other options, depending 
on how the data is formatted.

-SteveSimon-


Chris R wrote:
> Hi. I am trying to read in a file that was created by another
> application. The first two lines of this file are composed of text
> that I don't need. Following are 100 lines of numbers that I do
> need. Any idea on how to load this file without making an overly
> specific script? The number of rows of numbers the other application
> generates varies.
> 
> Thank you for any tips!
0
ssimon1 (201)
4/4/2005 6:20:46 PM
Reply: