Message Boards Message Boards

0
|
2606 Views
|
3 Replies
|
3 Total Likes
View groups...
Share
Share this post:

[?] Define a null valued function?

Posted 7 years ago
POSTED BY: Adam Domjan
3 Replies
Posted 7 years ago

Thank you very much.

POSTED BY: Adam Domjan

In fact, Most pattern matching functions should be defined with := to avoid this type of problem. I find that using = (Set) is the exception and not the rule...

POSTED BY: Neil Singer

You need to use a Setdelayed (:=) instead of Set (=) to create your function:

NullFunction1[t_] := 0*t;

To understand why, type ?NullFunction1 to see your definition and then do the same for the new definition.

Regards

POSTED BY: Neil Singer
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