[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Operations with int and single
From: |
Israel Herraiz |
Subject: |
Operations with int and single |
Date: |
Thu, 13 Sep 2012 10:33:11 +0200 |
User-agent: |
Sup/git |
Hi,
I have noticed that Octave behavior when operating with int and single
variables differs from MATLAB.
In Octave this works:
octave:1> int16(3)+single(4)
ans = 7
However, the same operation in MATLAB:
>> int16(3)+single(4)
Error using +
Integers can only be combined with integers of the same class, or scalar
doubles.
In general, in MATLAB, int variables (int8, int16, uint8, etc) can
only operate with integers of the same class, or with doubles, but not
with singles.
Is this behavior in Octave intended?
Thanks.
Israel
- Operations with int and single,
Israel Herraiz <=
- Re: Operations with int and single, Júlio Hoffimann, 2012/09/13
- Re: Operations with int and single, Israel Herraiz, 2012/09/13
- Re: Operations with int and single, Thorsten Liebig, 2012/09/13
- Re: Operations with int and single, Israel Herraiz, 2012/09/18
- Re: Operations with int and single, John W. Eaton, 2012/09/18
- Re: Operations with int and single, Israel Herraiz, 2012/09/18
- Re: Operations with int and single, Jordi Gutiérrez Hermoso, 2012/09/18
- Re: Operations with int and single, Jordi Gutiérrez Hermoso, 2012/09/18
- Re: Operations with int and single, Judd Storrs, 2012/09/18
- Re: Operations with int and single, John W. Eaton, 2012/09/18