Matlab lesson on defensive programming

Translation of the Python lesson on defensive programming. Addresses issue #797 
and prints an error message.