Tag Info

New answers tagged

3

You need to add an Evaluate as Plot has the attribute HoldAll. foo[f_, opts : OptionsPattern[Plot]] := Plot[f[x], Evaluate@Flatten@{x, First@OptionValue[PlotRange]}, opts] foo[# &, PlotRange -> {{-3, 3}, Automatic}]


1

Runge-Kutta Formula Implementation Options[RKSolve] = {Method -> Automatic, WorkingPrecision -> MachinePrecision}; RKSolve::badmeth = "`1` is not a valid value of option `2`"; RKSolve[func_, {a_, b_, h_: .1}, ya_, opts : OptionsPattern[]] := Module[{num, method, subfn, order}, method = Method /. {opts} /. Options[RKSolve]; If[ ! ...



Top 50 recent answers are included