In Matlab, arrays of booleans can be used in conditionals and are, I believe, considered true if all the values in them are true and false otherwise. In Julia only actual boolean values (true or false) can be used in conditionals. You're using a 1-d boolean array somewhere in a conditional. Not sure where – I took a quick look, but nothing popped out at me.
On Wed, Apr 23, 2014 at 4:16 PM, Isaac <dux...@gmail.com> wrote: > > Hi All, > > I am a new Julia-user and meet a problem when I transfer the Matlab code > to Julia. I always get the error:type non-boolean (BitArray(1)) used in > boolean context. Can anyone help me check the code and solve this problem? > The codes have been attached. > I am using the julia-0.3.0-win64 binary release. > Any suggestions and comments would be highly appreciated. > > Cheers, > Isaac > > <http://www.google.nl/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCsQFjAA&url=http%3A%2F%2Fforum.wordreference.com%2Fshowthread.php%3Ft%3D2248185%26langid%3D22&ei=Ih9YU4-UJM3JOaCjgKAP&usg=AFQjCNHQ9d3MxWGbJ6kVa5WXzgnDQ1VBRQ&sig2=fFKs_1zFpZD67HrDPpH8Mg> >