Skip to content

Create and use Interpolation in MTK model all from symbolic parameters #3048

@htsnowden

Description

@htsnowden

Question❓

Is there a way to convert symbolic parameters and variables into an interpolation using datainterpolations and have a symbolic equation that then evaluates on this? My idea is as follows

using DataInterpolations,ModelingToolkit
@variables y(t)[1:10] A B
@parameters xgrid[1:10] C

spl = LinearInterpolation(xgrid,y)
@register_symbolic spl(x::AbstractVector,y::AbstractVector)::LinearInterpolation
B ~ spl(A)*C

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions