Post Reply 
Few problems with ilaplace, subst and x vs X...
02-08-2015, 05:53 PM (This post was last modified: 02-08-2015 05:59 PM by dg1969.)
Post: #1
Few problems with ilaplace, subst and x vs X...
I try to write an APP and have some troubles with theses examples :

Code:

ilaplace(1/x^2,x,'X') => X : OK
ilaplace(2,x,'X') => 2*Dirac(x) :o( small x 

even worst :

ilaplace(2*e^(-x)/x) => 2*Heaviside(x-1) : Good but...
ilaplace(2*^(-x)/x,x,'X') => 0  :o(

So I try with subst function... another way to do in two operations...

Code:

subst(2*Dirac(x),x,'X') => 2*Dirac(X) : wonderfull "big X" but...
subst(2*Heaviside(x-1),x,'X') => 0 :o(

of course in CAS and 6975 firmware.

Any idea ?
Find all posts by this user
Quote this message in a reply
02-09-2015, 08:22 AM
Post: #2
RE: Few problems with ilaplace, subst and x vs X...
There is indeed a bug, the Dirac function is not returned in terms of the 3rd argument of ilaplace, I'm fixing that. But you should avoid using X as 3rd variable since X is not symbolic, it has it's HOME value, therefore Heaviside(X-1) is 0 if X=0.0 (default X value)
Find all posts by this user
Quote this message in a reply
02-09-2015, 10:58 AM
Post: #3
RE: Few problems with ilaplace, subst and x vs X...
(02-09-2015 08:22 AM)parisse Wrote:  ... you should avoid using X as 3rd variable since X is not symbolic, it has it's HOME value, therefore Heaviside(X-1) is 0 if X=0.0 (default X value)

Thank's for your answer but it's look strange to me... I know that X have a zero default value but I use quotes... for me 'X' should act like a symbolic var...

I try to make a custom APP based on the "function app" to solve motion control problem. I need to put symbolic expressions in F0-F9 in term of 'X' var. Actually my code works great with 'X' in 3rd arg (notice the quotes around) except when Dirac and Heaviside comes ...

My idea is to use SYMB view for the natural input of transfert function in term of X. Then when pressing "plot" the code silently calc the symbolic temporal response in term of 'X' or module or arg (for bode plot) and place these symbolic expression in place of the original transfert function in F0-F9 var... Of course theses originals transfer functions are carefully saved in a list and when the user press the "Symb" button again the original transfer func are back in place...

Sorry for my very bad english...
Find all posts by this user
Quote this message in a reply
02-09-2015, 12:53 PM
Post: #4
RE: Few problems with ilaplace, subst and x vs X...
The problem with HOME variables is that they have always a value and you do not have full control of evaluation (except in a few situations with quotes, but this is fragile especially if there is a HOME-CAS-HOME roundtrip like for evaluation of Dirac/Heaviside).
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)