Message Boards Message Boards

0
|
4603 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

use my function

Posted 9 years ago

Hi. I dont; understand how use if conditionals in wolfram. If NeedOtsu is true I should use Binirize, If NeedOtsu is false I should use my function. I tryed to use this but there is Error: Tag Binarize in Binarize[]/;True is Protected. >> What is wrong?

POSTED BY: Dmitry Dmitriev
2 Replies
POSTED BY: Otto Linsuain

It depends on what syntax you are using. You can try something like this:

myProcedure /; NeedOtsu := Binarize[something];
myProcedure /; Not[NeedOtsu] := myFunction[something]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract