Using Simulink    

Specifying the Current User

When you create or updates a model, Simulink logs your name in the model for version control purposes. Simulink assumes that your name is specified by at least one of the following environment variables: USER, USERNAME, LOGIN, or LOGNAME. If your system does not define any of these variables, Simulink does not update the user name in the model.

UNIX systems define the USER environment variable and set its value to the name you use to log on to your system. Thus, if you are using a UNIX system, you do not have to do anything to enable Simulink to identify you as the current user. Windows systems, on the other hand, might define some or none of the "user name" environment variables that Simulink expects, depending on the version of Windows installed on your system and whether it is connected to a network. Use the MATLAB command getenv to determine which of the environment variables is defined. For example, enter

at the MATLAB command line to determine whether the USER environment variable exists on your Windows system. If not, you must set it yourself. On Windows 98, set the value by entering the following line

in your system's autoexec.bat file, where yourname is the name by which you want to be identified in a model file. Save the file autoexec.bat and reboot your computer for the changes to take effect.

On Windows NT and 2000, use the Environment variables pane of the System Properties dialog box to set the USER environment variable (if it is not already defined).

To display the System Properties dialog box, select Start->Settings->Control Panel to open the Control Panel. Double-click the System icon. To set the USER variable, enter USER in the Variable field and enter your login name in the Value field. Click Set to save the new environment variable. Then click OK to close the dialog box.


  Managing Model Versions Model Properties Dialog Box