In MATLAB can I convert a java boolean to a MATLAB logical?

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?

Answer:1

I need to fix my previous code. If the input is "aabbcdefgghijkllaa", the output needs to be "abcdefghijkla". My current code that I have changed outputs "alkjihgfedcba". (The input may not ...

I've a DB query using ORDERED BY and the corresponding result set is processed to a list of custom objects. The object class does not implement Comparable . It however overrides equals() and ...

I have created a JButton class that recieving Action, the JButton class includes keystrokes & mouse listener so i can use the same class in multiple frames as needed. My problems is that: JButton ...

I wish to pass to Hibernate's SessionFactory hibernate.hbm2ddl.auto=update and see in log file generated sql statements. Is it possible w/o java coding (know how to achieve the result with ...