Skip to content

Commit adeac29

Browse files
Merge pull request #925 from asprionj/intro_ex
New Introductory Example
2 parents 935a32e + dd5a6f5 commit adeac29

File tree

2 files changed

+308
-123
lines changed

2 files changed

+308
-123
lines changed

docs/src/basics/FAQ.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,3 @@ lowered array? You can use the internal function `varmap_to_vars`. For example:
2121
```julia
2222
pnew = varmap_to_vars([β=>3.0, c=>10.0, γ=>2.0],parameters(sys))
2323
```
24-
25-
## Embedding data into a symbolic model
26-
27-
Let's say for example you want to embed data for the timeseries of some
28-
forcing equations into the right-hand side of and ODE, or data into a PDE. What
29-
you would do in these cases is use the `@register` function over an interpolator.
30-
For example, [DataInterpolations.jl](https://github.com/PumasAI/DataInterpolations.jl)
31-
is a good library for interpolating the data. Then you can do:
32-
33-
```julia
34-
spline = CubicSpline(data,datat)
35-
f(t) = spline(t)
36-
@register f(t)
37-
```
38-
39-
This will make `f(t)` be a function that Symbolics.jl will not attempt to trace.
40-
One should also consider defining the derivative to the function, if available.

0 commit comments

Comments
 (0)