MATLAB

Code:

Documentation: