Today we delve into Associations aka Dictionaries in languages like Python
Let’s do some list FU, a kind of Kung Fu with Wolfram language lists
Diving deeper into lists
Dipping into Lists
Today we see how to use Wolfram language as a Calculator using the Notebook environment
Mathematica is becoming an indispensable tool for doing all kinds of computation and it is important to know how to use it as it will leverage your problem-solving skills, allowing you focus on higher level issues of modelling solutions rather than focusing too much on calculational details.
I will be posting short lessons regularly and the good news is you don’t need to install anything locally as all examples can be run online. If you need to do any form of extensive programming you can always go to the Wolfram Cloud and click on Programming Lab and get access for free.
Instructions on running code
If you don’t have a Wolfram ID, create one as this will give you access to the Wolfram Cloud. After you have done this sign in. If you have one then simply sign into the Wolfram Cloud.
If you have downloaded the notebook file from the blog and saved it somewhere then do the following to upload it to the cloud so you can play with the code.…
Edit: If you want to see the full code, I include everything in this post in the Mathematica file here.
I promised previously that we would go into depth into the graph theory and food calculations, so today we will do just that. This will be Mathematica heavy, so really this is only aimed at those who have played around with the Mathematica programming language.
I’ve been using this language now for over a decade, and while it is not the fastest language on the market for doing numerics-heavy calculations, it is an incredibly versatile language, and for getting code written fast, it’s hard to beat!
I tend to code in what is called a functional programming style (ideal for Mathematica), which doesn’t use loops as you would normally find in a procedural language. Perhaps the most oft used coding syntax you will see below is of the form:
which takes the elements of a list and passes them one by one into a function.…