MATH 245 • Spring 2016

Mathematica

After you have access to Mathematica (myQC link) on campus or at home, this is where to come for Mathematica resources related to mathematical modeling.

Course materials:

A condensed list of handy Mathematica commands.

Tutorial 1: Getting started in Mathematica.

Tutorial 2: Using lists in Mathematica. (Save to computer: 245sp16tut2.nb)

Tutorial 3: Plotting functions and data in Mathematica. (Save to computer: 245sp16tut3.nb)

Tutorial 4: Fitting functions to data in Mathematica. (Save to computer: 245sp16tut4.nb)

Tutorial 5: Matrices and Vectors in Mathematica. (Save to computer: 245sp16tut5.nb)

Tutorial 6: Introduction to Random Numbers. (Save to computer: 245sp16tut6.nb)

Tutorial 7: Introduction to Simulation Models. (Save to computer: 245sp16tut7.nb)

Helpful Mathematica techniques

  • Keep a diary! Write down commands that you have explored, keeping track of syntax, interesting things that you can do, and questions that pop up.
  • Think before you code! Before you start typing, think about what you want the computer to do, and how you would be able to write a logical sequence of commands to do this thing. Write some pseudocode out first.
  • Build in stages! When trying to get Mathematica to do a multi-step command, make sure each nested command works before trying to wrap it in another command. Work from the inside of the onion outward!
  • Copy, modify, repeat! When you have code that is working, don't modify it. Copy it to the next line and then modify it. This forms a page of scratch work.