Tutorials

Python

Introduction to Python

IntroToPython.pdf

IntroExampleCode.zip

Object Oriented Python

PythonOOP.pdf

OOPExampleCode.zip

Python From Matlab

PythonFromMatlab.pdf

PythonMatlabExampleCode.zip

Note: If you get the error

Undefined variable "py" or class

or with my example specifically

Undefined variable "py" or class
"py.PycClass.VehicleClass".

You may need to do one or both of the be below

  1. Got to follow instructions at:
    http://www.mathworks.com/help/matlab/matlab_external/undefined-variable-py-or-function-py-command.html
  2. In matlab, you may need to add
import py.sys.path
path.append('dir')

Where ‘dir’ is a string to the directory where the class you want is (the directory where PyClass.py is for my examples) . This tells the python instance running in MATLAB to look in ‘dir’ for the the class.

Dan++

Dan++:A Quick Look

Blog Posts

They Call Me Dan