How to convert octave_value to string?

John W. Eaton jwe at bevo.che.wisc.edu
Wed Sep 3 16:04:53 CDT 2008


On  3-Sep-2008, Jaroslav Hajek wrote:

| Consider:
| 
| octave:1> class (1 + 1)
| ans = double
| octave:2> class (single(1) + 1)
| ans = single
| octave:3> class (int32(1) + 1)
| ans = int32
| octave:4> class (logical(1) + 1)
| ans = double
| octave:5> class (char(1) + 1)
| ans = double
| 
| I bet that novices to both Matlab and Octave will think "wtf?" here...
| yeah and watch this:
| octave:6> class (logical(1) + char(1))
| ans = double
| 
| amazing, right?

People seem to want Octave to be a Matlab "clone", so I don't think we
get to choose this behavior.  Instead, I think you can blame Cleve for
these design decisions.

jwe


More information about the Help-octave mailing list