Auto Regression Model implemention by C and verified by matlab