조회 수: 3(최근 30일)
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.

로그인 to comment.

### 답변 수 (1)

Wayne King 19 Apr 2016
Wayne King 님이 편집함. 19 Apr 2016
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

표시 이전 댓글 수: 1
Walter Roberson 19 Apr 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)
Fausto Arinos Barbuto 19 Apr 2016
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 20 Apr 2016
Hmmm, try
dirac(sym('2'), sym('1'))
if that does not work then try
evalin(symengine, 'dirac', 2, 1)

로그인 to comment.

이 질문에 답변하려면 로그인을(를) 수행하십시오.

Translated by