partial solution for Numeric Computing With Matlab