[Top][All Lists]

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

Re: 9. Re: : new to octave, confused about load(), dlmread et cetera

From: Philip Nienhuis
Subject: Re: 9. Re: : new to octave, confused about load(), dlmread et cetera
Date: Fri, 3 Sep 2010 15:01:52 -0700 (PDT)

Roman.Griego wrote:
>> >
>> > The original data was an csv export of a sql query done in excel. I
>> > grabbed the first two lines because row one was my header, the second
>> was
>> > a related piece of data that didn't really belong with the rest of
>> the
>> > data. I stripped the zeros because I was making histograms from the
>> data.
>> > The zeros were added from dlmread to make all the rows the same
>> length, in
>> > my case all my data are integers greater than one.
>> >
>> Can't you just read it directly from the Excel file then?
>> There is direct .xls R/W support in octave nowadays (using the octave-
>> forge
>> io pkg).
>> Empty cells in an Excel range are read as NaNs which -reading postings
>> earlier in the thread- might come in handy, too.
>> Philip
> ******************************************
> [rdgriego] 
> If I do that I still have to convert the file to Tab Delimited...
> I'd rather not use excel at all, however right now it is my best access to
> the SQL server I need.

I suppose we don't understand each other well.....?

>From the example code I saw in your earlier posting + your explanation
quoted above (top), I conclude you want to build a struct from something
like a simple table dumped in a spreadsheet by an SQL query.

What I meant was that you could use the results from an xlsread() call
(returning a numeric data array plus one or two cell arrays from which you
can extract the field names) almost directly to fill up your struct.
As you would bypass the text file reading & parsing stuff completely that
way, there's no tab processing involved at all.
But OK, I might have a wrong perception of what you want to achieve.

If the motive for avoiding Excel is to stay away from proprietary code, you
could also use Calc - OOo has a rich support for bindings to
various database engines and Octave (-forge) supports .ods file I/O too,
quite on par with Excel .xls I/O.


View this message in context:
Sent from the Octave - General mailing list archive at

reply via email to

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