Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

9
  • 4
    How did you define boolean? It's not a built-in function, so I substituted logical and got a different result altogether. Are you using the same parameters (1.5, 20, 40)? Commented Jan 3, 2013 at 4:16
  • 1
    As @Emre mentioned logical is the proper matlab command to cast variables as booleans. However, note that for initializing variables you can also just use false(size) rather than logical(zeros(size)) Commented Jan 3, 2013 at 9:40
  • @Emre, I did use exactly the same parameters. I'll try logical, and also Dennis' solution. Commented Jan 3, 2013 at 11:26
  • 1
    Wouldn't it be best not to assume the Wikipedia has it right? I would ask the uploading author by email for his code. You can also find some MATLAB implementations here. Commented Jan 3, 2013 at 19:49
  • 1
    He hasn't deleted his account; he just hasn't written on his user page. You can leave a message on his talk page +[cz]. Commented Jan 4, 2013 at 4:31