Missing error message when using division on a uint8 type
Steen Eiler Jørgensen
sjn at terma.com
Tue Aug 19 05:00:01 CDT 2008
Octave version: 3.0.1
Hardware: Intel(R) Core(TM)2 Duo CPU
T7500 @ 2.20GHz
2.19 GHz, 1,98 GB of RAM
Physical Address Extension
OS: Microsoft Windows XP
Professional
Version 2002
Service Pack 2
Description:
-----------
When dividing a uint8 type with e.g. an integer, the rounded result is returned.
In MatLab, the same operation returns an error message.
The problem can be worked around by using double(foo); float(foo) does not work.
Repeat-By:
---------
uint8(11)/3
will yield the result 4, which should obviously have been 3.6667.
Fix:
---
In MatLab, the same operation results in an error message with the text:
??? Error using ==> /
Function '/' not defined for variables of class 'uint8'.
Best Regards,
Steen Eiler Jørgensen
Systems Engineer, M.Sc.
Space
Terma A/S
Vasekær 12
2730 Herlev
Denmark
T +45 8743 6000
T +45 4594 9624 (direct)
F +45 8743 6001
E sjn at terma.com <mailto:sjn at terma.com>
W www.terma.com <http://www.terma.com/>
________________________________
Attention:
This e-mail (and attachment(s), if any) - intended for the addressee(s) only - may contain confidential, copyright, or legally privileged information or material, and no one else is authorized to read, print, store, copy, forward, or otherwise use or disclose any part of its contents or attachment(s) in any form. If you have received this e-mail in error, please notify me by telephone or return e-mail, and delete this e-mail and attachment(s). Thank you.
More information about the Bug-octave
mailing list