Tag Info

New answers tagged

1

Check: Check[expr, failexpr] evaluates expr, and returns the result, unless messages were generated, in which case it evaluates and returns failexpr. Check[expr, failexpr, {s1::t1, s2::2, …}] checks only for the specified messages. Check[expr, failexpr, "name"] checks only for messages in the named message group. CheckAbort: ...


6

Using the answer of belisarius in Setting up diagnostic error messages in large Mathematica projects allows to do exactly what I wanted. $MessagePrePrint = ( #; Print[Stack[_][[;; -5]]]; Abort[]) & t = {t} (*prints the stack and aborts*) Specializing $MessagePrint to only print the Stack in a recursion helps even more for this question. ...


0

EDIT: Corrections VBA to Mathematica code translation optval[vol_, intrate_, expn_, payoff_, strike_, Etype_, NAS_] := Module[{S, vold, Vnew, Dummy, ds, dt, NTS, q, gamma, Delta, Theta}, S = Table[0, {NAS + 1}]; vold = Table[0, {NAS + 1}]; Vnew = Table[0, {NAS + 1}]; Dummy = Table[0, {NAS + 1}, {3}]; ds = 2*strike/NAS; dt = 0.9/vol^2/NAS^2; ...



Top 50 recent answers are included