By default, MATLAB® installs apps from .mlappinstall files in the userpath \Apps\appname folder. The userpath is the path returned by userpath, and appname is the name of the installed app (sometimes with an additional character added to the name).
To change the apps installation folder:
On the Home tab, in the Environment section, click Preferences > MATLAB > Apps.
In the Apps Install Folder field, specify a folder name to which you have write access.
Note: If you change the app installation folder, then apps installed prior to the change (other than those installed with MATLAB products) are no longer accessible from the apps gallery. To make those apps accessible again, move their appname folders and contents to the new installation folder, and then restart MATLAB.