Love it (I do!) or hate it (You're using it for the wrong thing); Matlab is a numerical computing engine. Similarly, Matlab is an incredible medium to learn how to numerically program. Their documentation is fantastic because it is not only filled with syntax, but theory and equations. I think it is possible to learn a lot while learning Matlab. Matlab is the Kool-Aid man equivalent of numerical computing; it can smash through most walls and make an enormous mess doing it. OH YEA!
This document discusses one of the ideas I use to write better documentation for vectorized Matlab code.
Matlab has a publish
function that uses formatted comments and a few special functions to provide several presentation layers on executed code (e.g. PDF, HTML). This is all well and good, but for vectorized matlab code it just doesn't matter.