Question about ilaplace()

The following lines:
>> syms s;
>> Fs = s^2;
>> ilaplace(Fs)
produce this output:
ans =
dirac(t, 2)
suggesting (to me) that there is a dirac() function that takes two arguments. However, for example,
>> dirac(1,2)
outputs an error ("Too many input arguments."). Can someone give me an explanation to that?
Thanks.

Respuestas (1)

Wayne King
Wayne King el 19 de Abr. de 2016
Editada: Wayne King el 19 de Abr. de 2016

0 votos

I think you mean
dirac(2,t)
and not dirac(t,2)
There is a function in Symbolic Toolbox called dirac() that takes the following syntax
dirac(n,x)
where n is the order of the derivative. Of course derivative is understood here in the sense of distributions.
So dirac(2,t) is the 2nd derivative of the Dirac distribution with respect to the variable t.
See the reference page:

4 comentarios

Fausto Arinos Barbuto
Fausto Arinos Barbuto el 19 de Abr. de 2016
Editada: Fausto Arinos Barbuto el 19 de Abr. de 2016
Hi Wayne;
Thanks for your reply.
dirac(t,2) is Matlab's very own output. I just copied and pasted such output into my note. On the other hand, ">> help dirac" says that dirac() is a function that takes only one argument. Too much confusion for a single function. Could that be because the Matlab version I tried is a bit too old (7.9.0 R2009b)?
Anyway, might you supply a simple and short example on how to use this symbolic Dirac function? Nothing seems to work and I'm really lost.
Walter Roberson
Walter Roberson el 19 de Abr. de 2016
The symbolic toolbox dirac is invoked if you have symbolic arguments. The numeric dirac is invoked if your arguments are completely numeric. For example
dirac(2, sym('1'))
compared to
dirac(2, 1)
Walter,
What you suggested did not work:
>> dirac(2, sym('1'))
Error using sym/dirac
Too many input arguments.
I must be missing something.
Walter Roberson
Walter Roberson el 20 de Abr. de 2016
Hmmm, try
dirac(sym('2'), sym('1'))
if that does not work then try
evalin(symengine, 'dirac', 2, 1)

Iniciar sesión para comentar.

Preguntada:

el 19 de Abr. de 2016

Comentada:

el 20 de Abr. de 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by