Ask Your Question
0

case distinction in symbolic expression

asked 2013-03-13 12:25:38 +0100

MvG gravatar image

Is it possible to include a case distinction in a symbolic expression?

More precisely, I'm currently trying to understand how to include a truncated power function into a symbolic expression, if that is at all possible.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-03-13 17:48:53 +0100

ndomes gravatar image

To distinct two cases you can use the heaviside function:

f(x) = heaviside(x)*x^2
print type(f)
f(2); f(0); f(-2)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-03-13 12:25:38 +0100

Seen: 674 times

Last updated: Mar 13 '13