automatically change parameter values in mod file

how to change the parameter values in the mod file automatically? Now I can only change the value manually. is there a way to write a matlab program that changes the parameter value of the mod file.
thanks
thanks