How to read a SOD file created with later version of Scilab?

I am using two versions of Scilab : 6.1 and 5.5. (because 6.1 has the fromJSON function)

In 6.1, I save a structure in a SOD file, the format used by Scilab since 5.2.

save('path/to/file.sod', 'variable')

In 5.5, I need to read this structure to use it elsewhere.

load('path/to/file.sod', 'variable')

But this returns the error listvar_in_hdf5 : Wrong version of SOD file. Max value expected : 2. found : 3

Is there a way to specify the version of SOD format to use for saving or loading ? or another way to save data in 6.1 and load it in 5.5 ? I tried using hdf5 but I did not succeed. It seems that I can't manage structures.

Thanks !


If your problem is specific to structs, you can solve it by saving to the Matlab v7 format. Here is an example where data file is created in Scilab 6.1.1

--> getversion
 ans  =

  "scilab-6.1.1"

--> x=struct("a",1,"b",2); savematfile("data.mat","x","-v7")

then loaded in Scilab 5.5.2:

-->getversion
 ans  =
 
 scilab-5.5.2   
 
-->loadmatfile data.mat; x
 x  =
 
   a: 1
   b: 2