[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Octave beginner-reading info from text file
From: |
Jordi Gutiérrez Hermoso |
Subject: |
Re: Octave beginner-reading info from text file |
Date: |
Tue, 14 Dec 2010 17:09:48 -0600 |
On 14 December 2010 04:16, Zamuel <address@hidden> wrote:
> Matrices can exist where ever in a file but they always start with following
> lines:
> # name: /HOME/AUTO/MEASUREMENT/B
> # type: matrix
> # rows: 25
> # columns: 778
> -1798.95 -1319.203 -839.456 -365.3882 93.78099 552.9503 ...
This is Octave's text format. You can read it with the load function.
> Alternatively the same file contains same info in a string form:
>
> $VAR1 = {
> 'name' => '/HOME/AUTO/MEASUREMENT/',
> 'data' => [
> [
> '-1798.95',
> '-1319.203',
> '-839.456',
> '-365.3882',
> '-20115.15'
> ],
> [
> '-2190.332'
> (...)
> ]
> ],
> 'rows' => 25,
> 'cols' => 778
This is Perl Data::Dumper format. Octave won't be able to read this
easily. Is there a way to excise this format from your files and use
the one above to read your matrices?
HTH,
- Jordi G. H.