From help-octave-request at bevo dot che dot wisc dot edu Sat Dec 27 15:51:35 2003 Subject: Re: save/load problem From: "Henry F. Mollet" To: Carolina Gama , Octave_post Date: Sat, 27 Dec 2003 13:51:03 -0800 *** local user variables: prot type rows cols name ==== ==== ==== ==== ==== rwd bool matrix 6 6 actual rwd matrix 6 6 actual2 octave:40> save myfilename2 actual2 octave:43> save myfilename actual warning: save: wrong type argument `bool matrix' octave:44> actual actual = 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 As per above, I also cannot save a boolean matrix (1 = true; if matrix element of rand (6) is > 0.8, 0 = false), -ascii or default save (as per above, which is -ascii on my computer). octave:47> default_save_format default_save_format = ascii Henry on 12/27/03 10:19 AM, Carolina Gama at carolina_gama at netcabo dot pt wrote: > Hi!! > I have to do a work for school with gnu octave, and my teacher didn't give > us much help. > I have a matrix called actual defined by: > > actual=rand(6,6)>0.8 > > , and I want to save it as a text document estado_inicial.txt, and after read > it from that location. I have been trying to use the save and load functions > and they are not working. I have also been searching the octave site and the > help option and the same error occurs. > >>> inic > numero de linhas? 6 > lin = 6 > numero de colunas? 6 > col = 6 > vivos = 0.20000 > actual = > > 1 0 0 1 0 0 > 0 0 0 0 0 0 > 0 0 1 0 0 0 > 0 0 0 0 1 0 > 0 0 0 0 0 0 > 0 0 0 1 1 1 > >>> global lin >>> global col >>> global actual >>> save -ascii estado_inicial.txt actual > warning: save: wrong type argument `bool matrix' > warning: near line 5, column 1: > >>>> save ("-ascii", "estado_inicial.txt", "actual") > >>> load -force estado_inicial.txt actual > error: load: failed to extract keyword specifying value type > error: load: reading file estado_inicial.txt >>> > > Could you help me with this problem? > Thanks, > > Carolina Gama > carolina_gama at netcabo dot pt ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------