implement numerical algorithms using Matlab