help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to load a text file?


From: Doug Stewart
Subject: Re: How to load a text file?
Date: Thu, 15 Dec 2011 23:57:44 -0500



On Thu, Dec 15, 2011 at 11:09 PM, George <address@hidden> wrote:
I downloaded the "latest version" from http://sourceforge.net/projects/octave/files/Octave_Windows%20-%20MinGW/Octave%203.4.3%20for%20Windows%20MinGW%20Installer/
"Looking for the latest version? Download Octave-3.2.4_i686-pc-mingw32_gcc-4.4.0_setup.exe (73.0 MB)"

Running Octave 3.2.4

I got textread working a little. It can read the file. How would you parse the following format into 2 arrays (or one 2D array)? The number is the first column, everything to the right of the first comma is in the second column. If that is not possible, I can change the comma to another character.

1,text text text, text text
2,text text text, more text
3,more text and text


Thank you for your help!


On Thu, Dec 15, 2011 at 7:00 PM, Ben Abbott <address@hidden> wrote:
On Dec 15, 2011, at 8:43 PM, George wrote:

> How do you load a text file in Octave?
>
> I tried textread and textscan, but got errors or unknown command.
>
> Also, how do I know if I need a package for a given command? The documentation doesn't say: http://www.gnu.org/software/octave/doc/interpreter/Simple-File-I_002fO.html#doc%2dtextread

What version of Octave are you running?

I suspect it is dated (older than the documentation you reference above).

It is possible that there are packages for Octave which include the functions you need. What OS are you running? Is there an "i/o" package available for it?

Ben




_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave




It would really help if you showed us the first 3 lines in the file.



--
DAS

https://linuxcounter.net/user/206392.html

reply via email to

[Prev in Thread] Current Thread [Next in Thread]