Numerical Computing in Python:

A Guide for Matlab Users

a Faculty Development Seminar

by Brian Blais, Science and Technology Department

Tuesday, May 15, 1PM 2007 

MRC Dining Hall


Matlab is a commercial program used extensively in the scientific and business
communities.  There are many reasons why it is very popular, including its
interactive structure, clean syntax, and ability to interface with fast
compiled languages, like C.  It also has many routines for signal and image
processing, optimization, and visualization.

Python is a modern language used extensively by Google and NASA, as well as
many others.  Like Matlab, it also has an interactive structure, clean syntax,
and the ability to interface with fast compiled languages, like C.  There are
modules in Python for doing numerical work and visualization, and thus one can
make a Python-based computational environment with much the same feel as
Matlab.  Python is also free, is far more versatile, and can be used in many
more applications than Matlab, including robotics, web frameworks, text
processing, and others.  It is particularly good as a first language, and I
have found it personally very useful in my classes.

This Faculty Development Seminar uses a ``how-to'' approach to setting up
Python as a computational environment, geared towards current users of Matlab
or similar environments.  It explores specific applications of numerical
computing, and highlights the power of using Python both in research and in
teaching.  The seminar will explore my own experiences of the past year,
converting from a die-hard Matlab fan to a Python enthusiast.

Talk Slides

You can download my presentation here: python_matlab.pdf


I am including here, for your convenience, direct links to install Python, and the numerical packages that go along with it.  You can download and install these on your laptop, and bring the laptop to the seminar, to get the most out of the seminar.  If you have any problems, you can email me at, and we can also debug some of this during the seminar.  I also provide the links to the actual websites where I downloaded these install programs.

Name What is it? Installation Source
Python The base language python-2.5.1.msi
numpy Numerical routines numpy-1.0.2.win32-py2.5.exe
scipy Scientific routines scipy-0.5.2.win32-py2.5.exe
matplotlib 2D Plotting matplotlib-0.90.0.win32-py2.5.exe
pyreadline library needed for ipython shell pyreadline-1.4.2.win32.exe
ipython Extended python shell ipython-0.8.0.win32.exe

Optional Install for Writing Extensions

Name What is it? Installation Source
MinGW GCC (C-compiler) and utilities MinGW Installer
Distutils Config File Configuration File for Disutils For Compiling Extensions distutils.cfg A small script to help compiling pyrex files


Post-Installation Conveniences

        C:\Python25\python.exe C:\Python25\scripts\ipython -pylab

Alternate Installation

In the few weeks of making this seminar, I came across a possibly better Python install for Windows specifically.  You can get an installer at

After the initial install, you need to click on the button that says "Do not Accept" to make it accept, and click Apply.  Then Click on the Repositories tab and select individual packages (there is no "Select All").  The packages you will need are (in no particular order):

You can't really break anything by selecting too much.

The original installation directions will still work.  Don't do both!  Choose either the enthought edition, or the one I've originally outlined.