In MATLAB can I convert a java boolean to a MATLAB logical?
Posted
by Adrian
on Stack Overflow
See other posts from Stack Overflow
or by Adrian
Published on 2010-03-16T12:02:44Z
Indexed on
2010/03/16
12:06 UTC
Read the original article
Hit count: 271
In MATLAB I'm using a couple of java routines I've written to interface with a MyQSL database. One routine returns a boolean value
result <1x1 java.lang.Boolean>
>> result
result =
true
When I then use it in a conditional statement I get an error message.
>> if result,
disp('result is true')
end
??? Conversion to logical from java.lang.Boolean is not possible.
Is there a way to use the java boolean class as a MATLAB logical type? Or do I have to resort to returning integer values from my java routines?
© Stack Overflow or respective owner