({{, (RefLink[ParametricFunction, paclet:ref/ParametricFunction])[pars,…] 
represents a function that computes a solution when evaluated with numerical values for the parameters pars. }})

OpenersNotesSection(Spacer1)Details

(RefLink[ParametricFunction, paclet:ref/ParametricFunction]) is generated by (RefLink[ParametricNDSolve, paclet:ref/ParametricNDSolve]) and (RefLink[ParametricNDSolveValue, paclet:ref/ParametricNDSolveValue]).

A (RefLink[ParametricFunction, paclet:ref/ParametricFunction]) object pfun is evaluated by using pfun[pvals] where pvals are explicit numerical values for the parameters pars.

A (RefLink[ParametricFunction, paclet:ref/ParametricFunction]) may return numbers, functions, or more complicated expressions based on the underlying computation.

Derivatives of (RefLink[ParametricFunction, paclet:ref/ParametricFunction]) are computed using a combination of symbolic and numerical sensitivity methods when possible.

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Parameters for a harmonic oscillator:

pfun = ParametricNDSolveValue[ {x''[t] + γ x'[t] +(ω^2)x[t]==0, x[0]==1, x'[0]==0}, x,{t,0,10},{γ, ω}]

With numerical values, an approximate function is returned:

xsol = pfun[.1, 4]

Plot[xsol[t],{t,0,10}]

Derivatives of the (RefLink[ParametricFunction, paclet:ref/ParametricFunction]) give the sensitivity solutions:

Plot[Evaluate[D[pfun[γ, ω][t], γ] /. {γ->.1, ω->4}], {t,0,10}]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[ParametricNDSolve, paclet:ref/ParametricNDSolve])  ▪  (RefLink[ParametricNDSolveValue, paclet:ref/ParametricNDSolveValue])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Differential Equations, paclet:guide/DifferentialEquations])}, {▪(RefLinkPlain[System Model Analytics & Design, paclet:guide/SystemModelAnalyticsDesign])}, {▪(RefLinkPlain[System Model Simulation, paclet:guide/SystemModelSimulation])}})}})