7

AFAIK, there is no way to get what you want with the built-in Reap and Sow. However, here is a drop-in Reap - Sow replacement based on Internal`Bag structure, which is also the one that the actual Reap and Sow are based on: SetAttributes[withSideEffect, HoldRest]; withSideEffect[code_, sideEffectCode_] := (sideEffectCode; code); $storage = <||> ...


7

NotebookEvaluate is implemented using a dialog subsession. The implementation literally evaluates Dialog[] and then begins initiating the evaluation of the notebook. The reason for doing this is so that we can achieve the behavior of each cell of the target notebook going through the full main loop evaluation, without disrupting a main loop evaluation that ...


5

One part of the problem has already been mentioned by @C.E. in his answer: Since Association is seen as atomic by the pattern matcher, no insertion of matched expressions happens within it. The reason this is a problem at all is that your postproc is not actually evaluated after the matches have been identified, but before. To prevent evaluation of the ...


4

The discrepancy you observe is mostly due to the fact that Mathematica's choice of branch cuts for Log[] (and thus Power[] as well) results in the observation that in general, $$\exp(i m \pi)^\nu\ne\exp(i m \nu \pi)$$ For instance, using formula 10.11.1 as an example (as suggested by Carl in a comment): With[{m = 3, ν = 53/10, z = 38/10}, N[{BesselJ[...


3

Not sure why you want to use ParametricPlot in the Manipulate, while you had used Plot in your first visualization. Consider that you have three components in your solution, so that would not make sense for a 2D parametric plot; you would have to use ParametricPlot3D instead. I suspect that neither are what you want, and instead you simply want plots of the ...


3

A possible workaround: keys = ToString /@ syms; postproc[x_, h_: keys] := Thread[h -> x] Association @@@ Cases[exprs, # -> postproc[syms], Infinity] & /@ patts {{<|"x1" -> 14, "x2" -> x2, "y" -> y|>}, {<|"x1" -> x1, "x2" -> 12, "y" -> 3|>, <|"x1" -> x1, "x2" -> 2, "y" -> 8|>}}


2

You can define pt[n_] := Power @@ Flatten[{99, Range[2, n]}] But it won't get you very far Table[pt[n], {n, 2, 4}] (* {9801, 9227446944279201, Overflow[]} *) As a check {99^2, 99^(2^3), 99^(2^(3^4))} (* {9801, 9227446944279201, Overflow[]} *)


1

Your file "database_IOtables _SA _NO _UK _ 2000_ 2015_run _ 1.m" isn't a Notebook, but a Package - right? Hence the EvaluationElements option is simply ignored, because Packages has no Cells and associated CellTags. Obviously, you are trying to adapt the code from the section Examples ► Applications on the Documentation page for NotebookEvaluate. Here is ...


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