help-octave
[Top][All Lists]
Advanced

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

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


From: Jaroslav Hajek
Subject: Re: new to octave, confused about load(), dlmread et cetera
Date: Tue, 31 Aug 2010 11:30:25 +0200

On Tue, Aug 31, 2010 at 3:04 AM, justin.cress <address@hidden> wrote:
>
> this seems to be the most asked question, but before I ask it, i'd like to
> assure everyone i've been googling around for a couple of hours now and
> haven't figured out where i'm going wrong,
>
> What i'd like to be able to do is load a bunch of column vectors from a csv
> or text file (created by stata) and have octave grab the headers as variable
> names.  I've tried all the functions I could find documentation on, but none
> of them work... csvread ignores headers, dlmread is the same... and load()
> gives
>
> error: load: failed to read matrix from file `ps1data.csv'
> error: called from:
> error:   readtest.m at line 9, column 1
>
> error: load: failed to read matrix from file `ps1data.txt'
> error: called from:
> error:   readtest.m at line 9, column 1
>
> for csv and tab delimit, respectively.
>
> any help would be appreeciated.
>
>

The reason why there is no "just load it" function in Octave for this
kind of data is that there is no built-in datatype for matrices with
named (and possibly heterogeneous) columns. Octave's arrays are, in
general, multidimensional and homogeneous (except cell and struct
arrays), and carry no row or column labels.

-- 
RNDr. Jaroslav Hajek, PhD
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



reply via email to

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