[Top][All Lists]

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

[Octave-bug-tracker] [bug #39532] hgload/hgsave functions missing

From: Pantxo Diribarne
Subject: [Octave-bug-tracker] [bug #39532] hgload/hgsave functions missing
Date: Wed, 05 Mar 2014 11:46:24 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:27.0) Gecko/20100101 Firefox/27.0

Follow-up Comment #6, bug #39532 (project octave):

Sorry my mistake, I said the way you use load doesn't work ... if you don't
use '-struct'.

I think it would be better to not use '-struct' and use the name of the struct
returned by load as a pointer for the origin of the file. 
Let me explain: matlab figs consist of a struct with the following name
"hgS_070000" or "hgS_080000" (for matlab 7 or 8) saved as a .fig with matlab's
binary data format. 

It would be interesting for octave to use the same strategy:
* we could then keep track of the version of octave that created the struct.
As hdl2struct may evolve and break backward compatibility, this will be
* we could also detect if the struct was written by matlab in which case we
shouldn't try to load it until struct2hdl is able to handle matlab structs.

It would then give you something like:

s_oct40 = hdl2struct (handle);
save ("-binary", fname, "s_oct40")

  load (fname, "s_oct40")
  error ("hgload: support only files created by hgsave from octave version 4.0
and latter")


Reply to this item at:


  Message posté via/par Savannah

reply via email to

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