2

In the App Designer there is an option Save -> Export to .m File...

Is there a function available to do the same from the Matlab Command Window?

I'm aiming for something I can use as a git precommit hook.

OrangeDog
  • 36,653
  • 12
  • 122
  • 207

1 Answers1

1

Use the type function:

diary app_exported.m
type app.mlapp
diary off

or from the command line:

matlab -batch 'type app.mlapp' > app_exported.m
OrangeDog
  • 36,653
  • 12
  • 122
  • 207