New answers tagged

0

After a lot of trial and error, I created a function that I think is fast enough for general data science (I mean, to be applicable to millions of records). At first, I tried to create two interpolation functions: one for the gap itself (with a zero order interpolation function), and one for the values (the "PathFunction" itself). But Mathematica ...


4

I do not see an elegant solution using TimeSeriesResample or the like using ResamplingMethod or MissingDataMethod. Maybe there is something undocumented? But programming something that does what you want does look straight forward imo: (* define a function to determine the gapsize for a given time *) gapsize = Function[ {ts, time}, With[ { ...


0

This seems to work as intended: style = CurrentValue[EvaluationNotebook[], StyleDefinitions]; Export["001_sty.nb", style, "Text"]; and style = Import["001_sty.nb", "Text"]; SetOptions[ EvaluationNotebook[], StyleDefinitions -> ToExpression @ style ]; Anyway, I think that a crash or an internal self test error, when a simple error message ...


2

It seems that this might be a bug or maybe a weakness of the NDSolvemachinery. One can observe, that with the option "SimplifySystem" -> False the issue does not arise. In fact a lot of settings will cause no problem at all. As far as I can see, the culprit is the option DependentVariables as it seems to influence the sequence of equation simplifications ...


4

Set ImagePadding option to None. (With None the exported image is cut a bit on the y-axis so use 10 instead of None) Plot[(180 Sqrt[\[Pi]^2 - 625 t] (\[Pi]^2 (-25 + 36 t) - 1500 t (-15 + 45 t -Sqrt[-\[Pi]^2 + 900 t])))/(\[Pi]^4 Sqrt[-\[Pi]^2 + 2500 t]) + Tan[2 Sqrt[\[Pi]^2 - 625 t]], {t, 0.01, 0.016}, AxesStyle -> {{Directive[Red, 12], ...


12

You must use opts : OptionsPattern[] and not opts_ : OptionsPattern[]. The : character has a double role: it can indicate a pattern name or an optional argument. If the left-hand-side is a symbol then it indicates a pattern name, otherwise it indicates an optional argument. Examples: a_ is a Blank named a. a : _ is a blank named a using : syntax. a_ : ...



Top 50 recent answers are included