0

I am trying to use the Dynamo notebook (https://www.ssc.wisc.edu/~whs/dynamo/dynamo_3S_v1.4.1.nb) in a loop over parameters. Basically, this software takes one matrix as input, solves ODEs and some other rather complex equations, and produces some graphical output that I am rerouting into an eps file. What I am trying to do is not only having one matrix as an input, but a list of them, and call the notebook with an index parameter that tells the Dynamo notebook to use the matrix at this index. This I could easily loop over. However, while I have been successfully operating master-slave notebooks with

nb=NotebookOpen["/path/to/file.nb"]
f[par_]:=(
  index1=par;
  NotebookEvaluate[nb];
)
f[5] (*5 is my choice for the variable index1 in my slave notebook*),

it produces a huge amount of error messages for the Dynamo software that vanish again immediately and restart the whole kernel on top of that. How can I fix this?

  • Why not just convert the code to a package and run that...? Any time you're "calling a notebook" you're probably thinking about the problem wrong. Notebooks are for exploration and interactivity. Packages are for chunks of code you want to reuse. – b3m2a1 Jul 03 '19 at 08:11
  • How about https://mathematica.stackexchange.com/questions/29324/creating-mathematica-packages – Kuba Jul 03 '19 at 09:11

0 Answers0