-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Altering the type of interpolation used with SampledData blocks #239
Comments
Possibly unrelated points, but I wasn't sure whether they were worth opening a new issue:
|
Yes that effectively would just be allowing the user to have the option to pass a different interpolation function.
They could, but the ODE solver only ever calls them at a single time point at a time so I'm not sure what the optimization would be here?
I'm not sure if it's implemented, but doing so should effectively work just by using observed. |
Makes sense, I looked more into how it works and it seems like it'd be fine if I just resampled my data before passing it into the solver.
Could you elaborate a bit on how this would work? |
Actually, rereading what you wrote, now I'm confused. Can you try describing it another way? |
Sure - I have sampled data that I'd like to feed into source terms for an ODE. The (data) -> (source term) transformation is a function that I can Currently, I can just apply the transformation myself and pass that in as a SampledData object, but that adds more steps before I'm able to remake the system each time, and it feels like the kind of thing MTK could automate. |
If I understand correctly, what you'd like to do is shown here: SampleData demo. You can see that the |
I changed the example you linked a bit to generate my MWE.
|
I'd like to use any of the DataInterpolations.jl interpolation types with SampledData blocks. In particular I'm interested in the cubic spline interpolation, but anything past linear would be useful. I think this would involve changing this call to
linear_interpolation
to something from DataInterpolations.jl or to one of a few new functions.The text was updated successfully, but these errors were encountered: