# Tag Info

5

Albert Retey has demonstrated in a similar situation that you can use "EventLocator" to detect an event in NDSolve. For example: eqn = {\!$$\*SubscriptBox[\(∂$$, $$t$$]$$u[t, x]$$\) == 1/100 \!$$\*SubscriptBox[\(∂$$, $$x, x$$]$$u[t, x]$$\) - u[t, x] \!$$\*SubscriptBox[\(∂$$, $$x$$]$$u[t, x]$$\), u[0, x] == Sin[2 π x], u[t, 0] == u[t, 1]}; ...

2

A method is to write a message handler, like in this answer. The handler is passed an argument of the form Hold[Message[...], boolean] where the boolean tells the handler if the message is to be displayed, or not. Since you are looking to capture the info passed to NDSolve::ndsz, I would write the handler like Clear[messageHandler, vals]; vals = {}; ...

2

Use Mapping multiple parameters of a function to specific values and supply it with the following version of parameters. parameters=Flatten[Table[{a, 1/bInverted}, {a, 1/2, 5, 1/2}, {bInverted, 2, 5}], 1] Update Let's redefine myfunction to be a function of a, b and x. myfunction[a_, b_, x_] := (b/a)*((a/x)^(b + 1)) Now when you generate parameters ...

1

Activate@Replace[Inactive[f][3],3->1, Infinity] 1 or Replace[Hold@f[3], 3 -> 1, Infinity] // ReleaseHold 1

Only top voted, non community-wiki answers of a minimum length are eligible