[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: integer concatenation (was: Octave 2.1.61 available for ftp)
From: |
John W. Eaton |
Subject: |
RE: integer concatenation (was: Octave 2.1.61 available for ftp) |
Date: |
Fri, 12 Nov 2004 00:25:51 -0500 |
On 10-Nov-2004, Hall, Benjamin <address@hidden> wrote:
| Here's what R14 does
|
| >> a = [int8(1), int16(2)];
| Warning: Concatenation with dominant (left-most) integer class may overflow
| other operands on conversion to return class.
| >> b = [int16(1), int8(2)];
| Warning: Concatenation with dominant (left-most) integer class may overflow
| other operands on conversion to return class.
| >> c = [int8(1), 2];
| >> d = [1, int8(2)];
| >> whos
| Name Size Bytes Class
|
| a 1x2 2 int8 array
| ans 1x2 2 int8 array
| b 1x2 4 int16 array
| c 1x2 2 int8 array
| d 1x2 2 int8 array
|
| Grand total is 10 elements using 12 bytes
OK. Should we also issue a warning?
| and, of course, it does the intN / complex concatenations
|
| >> e = [1 int8(3+2i)];
| >> f = [3+2i, int8(4)];
| >> whos e f
| Name Size Bytes Class
|
| e 1x2 4 int8 array (complex)
| f 1x2 4 int8 array (complex)
|
| Grand total is 4 elements using 8 bytes
I don't expect that Octave will have integer complex values any time
soon.
Thanks,
jwe