The black ball is from a Lego Star Wars series - there is another, heavier ball inside and it works as a counter-weight for the motor. The green guy is a creeper from Minecraft - purely for decoration. :-)
I don't know if I will be able to program it from Matlab, because both ways of communication with my Mac Book Air: bluetooth and USB are broken - Lego's drivers are not working.
If you wonder how Matlab programs look like, here is an example: