Timeline for Export data from NDSolve when they meet a certain condition
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 31, 2020 at 0:15 | history | edited | J. M.'s missing motivation♦ |
edited tags
|
|
Dec 30, 2020 at 19:57 | history | edited | Michael E2 | CC BY-SA 4.0 |
tags
|
Oct 10, 2014 at 17:08 | vote | accept | Geo | ||
Oct 10, 2014 at 17:04 | comment | added | Geo | well this is an example only. the equation i really want cross the 0 many times, so it would be better. thanks for the info tho | |
Oct 10, 2014 at 16:58 | answer | added | mmal | timeline score: 5 | |
Oct 10, 2014 at 15:41 | comment | added | DumpsterDoofus |
Plotting y[t] shows that y[t]==0 has two solutions on the interval you used. The roots are found using FindRoot[y[t] /. sol, {t, -1}] FindRoot[y[t] /. sol, {t, 4}] which yields {t -> -0.655304} and {t -> 3.66267} , and by inspecting the plot, only {t -> -0.655304} satisfies py[t]>0 . So your final data is just a single 2D point, {x[t], y[t]} /. {t -> -0.655304} /. sol // Chop , which yields {0.444787, 0} . I don't quite understand why you need to export this as a TXT file, since it's just a single point, so you could just type it in manually.
|
|
Oct 10, 2014 at 15:10 | history | asked | Geo | CC BY-SA 3.0 |