Skip to main content
7 events
when toggle format what by license comment
Jul 8, 2022 at 18:13 history edited Michael E2 CC BY-SA 4.0
Clarification
Aug 7, 2017 at 15:01 vote accept Chris K
Aug 7, 2017 at 14:57 history bounty ended Chris K
Aug 7, 2017 at 3:06 history edited Michael E2 CC BY-SA 3.0
Added general solution
Aug 2, 2017 at 3:54 comment added Chris K Here's an example that generates a Hermite InterpolatingMethod: sol = NDSolve[{n'[t] == (Sin[2 \[Pi] t] + 1) n[t] - n[t]^2, n[0] == 0.01}, n, {t, 0, 100000}][[1]]. Timing[g1 = (n /. sol)["ValuesOnGrid"];] is 1 second, but Timing[g2 = (n /. sol)[[4, 3, ;; ;; 2]];] is 0.017s, and g1==g2.
Aug 2, 2017 at 3:51 comment added Chris K Thanks! Looks like all of the InterpolatingFunctions I commonly get as solutions to first order initial value problems in NDSolve have InterpolatingMethod Hermite. if[[4, 3, ;; ;; 2]] is a faster equivalent to if["ValuesOnGrid"] on the examples I've looked at, but I've already been surprised by the variety of possible structures inside InterpolatingFunctions, so it needs more testing tomorrow.
Aug 2, 2017 at 3:03 history answered Michael E2 CC BY-SA 3.0