How To Write Matlab Code For Algorithm