[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Java predicate tests
From: |
Michael D. Godfrey |
Subject: |
Re: Java predicate tests |
Date: |
Fri, 21 Dec 2012 11:45:25 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
On 12/21/2012 11:05 AM, Rik wrote:
12/20/12
Could someone run the following in Matlab and report the results? There
may be errors, but that would be interesting.
x = javaObject ('java.lang.String', 'Hello');
ischar (x)
y = [x ' World']
class (y)
z = javaObject ('java.lang.Double', 4.2);
isnumeric (z)
t = z + 3.1
class (t)
w = single (z)
w = uint8 (z)
--Rik
>> x = javaObject ('java.lang.String', 'Hello');
>> ischar (x)
ans =
0
>> y = [x ' World']
??? Error using ==> horzcat
The following error occurred converting from char to opaque:
Error using ==> horzcat
Undefined function or method 'opaque' for input arguments of type 'char'.
>> class (y)
??? Undefined function or variable 'y'.
>>
>> z = javaObject ('java.lang.Double', 4.2);
>> isnumeric (z)
ans =
0
>> t = z + 3.1
??? Undefined function or method 'plus' for input arguments of type
'java.lang.Double'.
>> class (t)
??? Undefined function or variable 't'.
>>
>> w = single (z)
??? Error using ==> single
Conversion to single from java.lang.Double is not possible.
>> w = uint8 (z)
??? Error using ==> uint8
Conversion to uint8 from java.lang.Double is not possible.
>>
=====================
Matlab R2009b