Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Snowd1n opened this issue Sep 16, 2024 · 2 comments
Closed
Labels
question Further information is requested

Comments

@Snowd1n
Copy link

Snowd1n commented Sep 16, 2024

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
@Snowd1n Snowd1n added the question Further information is requested label Sep 16, 2024
@ChrisRackauckas
Copy link
Member

We're working on a solution here, hold your horses 🐴

@Snowd1n
Copy link
Author

Snowd1n commented Sep 16, 2024

Will do. Thank you

@Snowd1n Snowd1n closed this as completed Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants