Is it possible??how?
I know that option exists, you can check
http://lab.dia.uned.es/automatlab/

tha simulations there have the option to generate a .m file....
If i get an answer abouthow to do this, i will post it here!

Regards!