From help-octave-request at bevo dot che dot wisc dot edu Tue Feb 8 15:55:36 2000 Subject: about: cubic root; load/save; struct member From: "John W. Eaton" To: redbliss at libero dot it Cc: "help-octave at bevo dot che dot wisc dot edu" Date: Tue, 8 Feb 2000 15:55:51 -0600 (CST) On 8-Feb-2000, redbliss at libero dot it wrote: | (-1)^(1./3.) yields | 0.5 + i 0.86603 | is this the wanted behaviour? Yes. There are three roots: 0.5 + 0.86603i, -1, and 0.5 - 0.86603i. Octave is returning the principal root. (Funny that no one ever complains that 1^(1/2) doesn't return -1. :-) | the file parameter of load and save could not be a variable containing | a string ( the file name), is it possible to do something like | filename = "a.dat" | save -ascii filename | (actually this yields an error) Try filename = "a.dat"; save ("-ascii", filename); | is it possible to eliminate the member of a struct, so that the struct | no longer contains it ? Sorry, there is no function for this in the 2.0.x releases of Octave. You could do it using a brute-force method, in which you copied all the elements that you wanted to keep. jwe ----------------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.che.wisc.edu/octave/octave.html How to fund new projects: http://www.che.wisc.edu/octave/funding.html Subscription information: http://www.che.wisc.edu/octave/archive.html -----------------------------------------------------------------------