help-octave
[Top][All Lists]
Advanced

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

Re: Please help me load/open a .csv file!!


From: Joe Koski
Subject: Re: Please help me load/open a .csv file!!
Date: Mon, 06 Sep 2004 10:35:00 -0600
User-agent: Microsoft-Entourage/10.1.4.030702.0

on 9/6/04 9:49 AM, anya guetinger at address@hidden wrote:

> Hello! sorry for such an elementary question.
> 
> i've been trying to load .mat file, .csv file and all
> so far have failed on me.  could someone please tell
> me what i've been doing wrong??
> 
> i've stareted the Octave with both;
> % octave --braindead
> and just:
> % octave 
> 
> i'm in the directory where the file that i want to
> open is...
>>> ls -l
> -rw-r--r--  1 main  main   18524  6 Sep 17:19 test.csv
> 
> and i tried to load this test.csv...
>>> load test
> 

What works for me with standard ascii files is:

fflush(stdout);
in_file = input("Enter name of input file: ","s");
a = load(in_file);

where a is a large matrix containing all the data that can then be copied to
other vectors/matrices as needed. The size() function can tell you how the
data are arranged.

I've never tried this with comma delimiters, just spaces.

On the same general subject, I've been removing any ascii character headers
from my ascii numeric files before loading them. Is there a way of skipping
some lines at the start of a load? I seem to remember that someone (jwe?)
said that the skip option is there but not currently functional.

A bit of elaboration in this area in the next edition of the Octave manual
would be useful.

Joe



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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