Convert Matlab Code To C Language