Chapter 7: Programming in MATLAB, "MATLAB An Introduction With Applications",Amos Gilat, 3rd Edition