[Scilab-users] save : save a list of variable don't work

Antoine Monmayrant antoine.monmayrant at laas.fr
Tue Oct 14 14:38:35 CEST 2014


On 10/14/2014 02:30 PM, Quentin Mazué wrote:
> Hello,
>
> I developped a script to save data with savematfile which works well but
> when i modified it to save files in sod format it failed.
>
> Here a small script to illustrate what I want to do :
> bug_save.sce <http://mailinglists.scilab.org/file/n4031334/bug_save.sce>
>
> I want to save the variables which names are contained into var2Save. It
> works well with savematfile() function but not with save() function.
Hi,

It's not a bug, it's a problem of syntax.
Look at the help page for 'save': there are two different calling sequences:
     - save(filename, varname) -> old deprecated version that you are 
using: it saves the variable varname (ie var2save that contains a vector 
of strings in your case).
     - save(filename, "varname") -> new hdf5-based version that saves 
the variable named "varname".

This is what you want to do I think:

save(pwd()+"\saveInSodFormat.sod",'a','b','c','d');


Cheers,

Antoine
>
> Moreover there is a warning : Scilab 6 will not support the file format
> used.
>
> Did I do something wrong or is it a bug?
>
> This could be related to this bug : 12305.
>
> Regards
> Quentin Mazué
>
>
>
> --
> View this message in context: http://mailinglists.scilab.org/save-save-a-list-of-variable-don-t-work-tp4031334.html
> Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>


-- 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++

  Antoine Monmayrant LAAS - CNRS
  7 avenue du Colonel Roche
  BP 54200
  31031 TOULOUSE Cedex 4
  FRANCE

  Tel:+33 5 61 33 64 59
  
  email : antoine.monmayrant at laas.fr
  permanent email : antoine.monmayrant at polytechnique.org

+++++++++++++++++++++++++++++++++++++++++++++++++++++++

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20141014/e24099ca/attachment.htm>


More information about the users mailing list