MATLAB: How to execute the TRIM function with a model which is not on the MATLAB path in Simulink 7.0 (R2007b)

simulink

I'd like to run TRIM function with a model which is not in the current directory and I would prefer not to add the directory to the MATLAB path.
When I run the command
trim([pwd,\test\sys.mdl'])
I receive the following error:
??? Error using ==> trim at 59
Error in specification of object or property name and value pairs.

Best Answer

The ability to specify a model name as absolute path is not available in TRIM function of Simulink 7.0(R2007b).
To work around this issue, run LOAD_SYSTEM command before you run TRIM function.
load_system([pwd,'\test\sys.mdl'])
trim(gcs)