Matlab => C conversion no works but hasn't been tested