help-octave
[Top][All Lists]
Advanced

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

Re: How can I save struct data?


From: Daniel Heiserer
Subject: Re: How can I save struct data?
Date: Wed, 21 Apr 1999 11:12:35 +0200

Akira Nishimura wrote:
> 
> I'm using Octave-2.0.13 and 2.0.14.
> 
> How can I save structure data or an element of the structure?
> 
> octave:5> a
> a =
> {
>   p1 =
> 
>     0.10000  0.30000  0.50000  0.70000  0.90000
> 
>   p2 = hello
> }
> 
> octave:6> save a.mat a
> error: save: wrong type argument `struct'
> error: evaluating index expression near line 6, column 1
> octave:6> save -ascii a.mat a
> error: save: wrong type argument `struct'
> error: evaluating index expression near line 6, column 1
> octave:6> a.p1
> ans =
> 
>   0.10000  0.30000  0.50000  0.70000  0.90000
> octave:7> save a.mat a.p1
> warning: save: no such variable `a.p1'
> 

saving octave data as a mat-file is only supported for matlab-4 files.
Matlab 4 had no structs and no cells. This is supported by matlab 5
which's
binary structure is different and not published. 

They are shipping libraries with them for reading and writing these
files. But because of OPEN-SOURCE it makes no sense to include these.
Maybe you could ask the MATHWORKS for revealing it's data-strucure.
If somebody is interested we could try to figure out what they
are doing.
We would need some m-files running on matlab and octave 
and also some stuff to decode the binaries. That is probably not
a big deal.
Somebody interested?


Bye daniel



reply via email to

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