Large Ascii Files and "textread.m"

Michael Barton bartonm09 at gmail.com
Mon Jul 7 16:23:14 CDT 2008


My apologies. Works great! Thanks for the help.

On Mon, Jul 7, 2008 at 1:41 PM, Dmitri A. Sergatskov <dasergatskov at gmail.com>
wrote:

> On Mon, Jul 7, 2008 at 2:56 PM, Michael Barton <bartonm09 at gmail.com>
> wrote:
> > Functions fgets and fgetl work; however, I can't get the following
> strings
> > read in.
> >
>
> You have to be more specific.
>
> octave:1> MyFileID = fopen("MyAsciiFile.txt", "r");
> octave:2> StringLine1 = fgets(MyFileID);
> octave:3> StringLine2 = fgets(MyFileID);
> octave:4> StringLine3 = fgets(MyFileID);
> octave:5> StringLine1
> StringLine1 = This is the 1st line of the file.
>
> octave:6> StringLine2
> StringLine2 = This is the 2nd line of the file.
>
> octave:7> StringLine3
> StringLine3 = This is the 3rd line of the file.
>
> ====
>
> $ cat MyAsciiFile.txt
> This is the 1st line of the file.
> This is the 2nd line of the file.
> This is the 3rd line of the file.
>
> ====
>
> Seems to be working fine here...
>
> Dmitri.
> --
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.cae.wisc.edu/pipermail/help-octave/attachments/20080707/b0783508/attachment.html 


More information about the Help-octave mailing list