Though a MATLAB API is available, I found the on-line examples lacking somewhat, especially when all I wanted to do was drive the servo and log its position. The following code does just that, moving the servo 90 degrees clockwise and anti-clockwise, then displaying a log of the 'present position' and 'moving' registers from the servo EEPROM.
Note that you'll need to download and register the dynamixel API with Matlab before using this code.
Here are the instruction from ROBOTIS:
These instructions from Agave Robotics are also useful
Note that I had to change the 'open device' code from the examples given above. They just wouldn't work!
I hope this is useful to someone, I spent some time searching for an example like this but couldn't find one. Of course the dynamixel servos can do much more than this but this is a nice place to start.
The source code can be downloaded from Google Docs here.