Sie sind auf Seite 1von 3

dirac

Diracdeltafunction

Syntax

dirac(x)
dirac(n,x)

Description
dirac(x)representstheDiracdeltafunctionofx. example

example
dirac(n,x)representsthenthderivativeoftheDiracdeltafunctionatx.

Examples

HandleExpressionsInvolvingDiracandHeavisideFunctions
ComputederivativesandintegralsofexpressionsinvolvingtheDiracdeltaandHeavisidefunctions.

FindthefirstandsecondderivativesoftheHeavisidefunction.TheresultistheDiracdeltafunctionanditsfirst
derivative.

symsx
diff(heaviside(x),x)
diff(heaviside(x),x,x)

ans=
dirac(x)

ans=
dirac(1,x)
FindtheindefiniteintegraloftheDiracdeltafunction.Theresultsreturnedbyintdonotincludeintegrationconstants.

int(dirac(x),x)

ans=
sign(x)/2
FindtheintegralofthisexpressioninvolvingtheDiracdeltafunction.

symsa
int(dirac(xa)*sin(x),x,Inf,Inf)

ans=
sin(a)
UseAssumptionsonVariables
diractakesintoaccountassumptionsonvariables.
symsxreal
assumeAlso(x~=0)
dirac(x)

ans=
0
Forfurthercomputations,cleartheassumptions.

symsxclear

EvaluateDiracdeltaFunctionforSymbolicMatrix
ComputetheDiracdeltafunctionofxanditsfirstthreederivatives.

Useavectorn=[0,1,2,3]tospecifytheorderofderivatives.Thediracfunctionexpandsthescalarintoavector
ofthesamesizeasnandcomputestheresult.

n=[0,1,2,3];
d=dirac(n,x)

d=
[dirac(x),dirac(1,x),dirac(2,x),dirac(3,x)]
Substitutexwith0.

subs(d,x,0)

ans=
[Inf,Inf,Inf,Inf]

InputArguments collapseall

xInput
number|symbolicnumber|symbolicvariable|symbolicexpression|symbolicfunction|vector|matrix|
multidimensionalarray

Input,specifiedasanumber,symbolicnumber,variable,expression,orfunction,representingarealnumber.This
inputcanalsobeavector,matrix,ormultidimensionalarrayofnumbers,symbolicnumbers,variables,expressions,
orfunctions.

nOrderofderivative
nonnegativenumber|symbolicvariable|symbolicexpression|symbolicfunction|vector|matrix|
multidimensionalarray

Orderofderivative,specifiedasanonnegativenumber,orsymbolicvariable,expression,orfunctionrepresentinga
nonnegativenumber.Thisinputcanalsobeavector,matrix,ormultidimensionalarrayofnonnegativenumbers,
symbolicnumbers,variables,expressions,orfunctions.

MoreAbout collapseall

DiracdeltaFunction
TheDiracdeltafunction,(x),hasthevalue0forallx0,andforx=0.
Foranysmoothfunctionfandarealnumbera,

dirac(x a) f (x) = f (a)


Tips
Forcomplexvaluesxwithnonzeroimaginaryparts,diracreturnsNaN.
diracreturnsfloatingpointresultsfornumericargumentsthatarenotsymbolicobjects.
diracactselementwiseonnonscalarinputs.
Atleastoneinputargumentmustbeascalarorbothargumentsmustbevectorsormatricesofthesamesize.Ifone
inputargumentisascalarandtheotheroneisavectororamatrix,thendiracexpandsthescalarintoavectoror
matrixofthesamesizeastheotherargumentwithallelementsequaltothatscalar.

SeeAlso
heaviside|kroneckerDelta

IntroducedbeforeR2006a

Das könnte Ihnen auch gefallen