help-octave
[Top][All Lists]
Advanced

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

Re: CSV-Files; XLS-File


From: forkandwait
Subject: Re: CSV-Files; XLS-File
Date: Sun, 22 Aug 2010 23:20:54 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Jose L. Contreras B. <jl.contrerasbiekert <at> me.com> writes:

> 
> Hi,
> 
> I've been trying to import an xls-file to octave. For that I saved as a csv-
file and I used csvread or csvwrite
> but I couldn't import. Can you sent me an example to do it well? What kind of 
characteristics must have the
> csv-file?, for example tab delimieter, space delimeter, etc. Thanks
> 
> pd. I'm a linux user by the way.


dlmread is the official way to do this, and we should deprecate csvread/csvwrite

Here is a simple example:

## create a csv file via the command line:

 $ cat > foo.csv
this is a header line
xx,yy,zz
1,2,3
4,5,6
7,8,9
^D

## read it with octave (having started octave first, and looked at help dlmread)
## the first param is the file, the second is the delimiter, the third tells us 
## to start on the third row, the fourth tells us to start in the first column

octave> dlmread('foo.csv', ',', 2,0)




reply via email to

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