Matlab Function Static Variable In Cpp