MATLAB: How to create shortcuts by commands


I'm wondering whether it is possible to create shortcuts on the toolbar by commands. I am going to release my GUI and I hope any user can install it by running a script (to add path and create a shortcut on the tool bar). Does Matlab have this kind of function/command? I just want to make the installation process simple so that even if the user is not familar with MATLAB can install the GUI by just a click. Any solution is welcome.

Best Answer

  • The shortcuts are stored in an XML file:
    where username is whatever name the user logged in as. It's not easy, but you could have your installer add a shortcut to that file by writing the appropriate XML commands in there. Take a look in the file at some of your existing shortcuts to see what you'll need to do.