MATLAB: How to set the custom library in Simulink to cache to a TEMP directory in another directory other than the default one in Simulink 7.6 (R2010b)

antivirusbrowserlibrarysimulinkslowstart

I am using custom library in Simulink which I want it to load in the Simulink library browser. Currently, Simulink caches it to the 'C:\TEMP' directory by default.
My C:\ directory has a virus scanner, which makes the library browser load into Simulink Library browser after a long time.

Best Answer

In order to save your custom libraries to another path, use the SETENV function to set a system variable called TEMP to any other directory.
The syntax is as follows:
setenv('TEMP', 'D:\My Folder');