xPC Target    

Setting Your Initial Working Directory

You should set your MATLAB working directory outside of the MATLAB root directory. The default MATLAB root directory is c:\matlab.

If your MATLAB working directory is below or inside the MATLAB root, files created by Simulink and Real-Time Workshop are mixed with the MATLAB directories. This mixing of files could cause you file management problems.

Setting from the Desktop Icon

Your initial working directory is specified in the shortcut file you use to start MATLAB. To change this initial directory, use the following procedure:

  1. Right-click the MATLAB desktop icon, or from the program menu, right-click the MATLAB shortcut.
  2. Click Properties. In the Start in text box, enter the directory path you want MATLAB to initially use. Make sure you choose a directory outside of the MATLAB root directory.
  3. Click OK, and then start MATLAB. To check your working directory, in the MATLAB Command Window, type

Setting from Within MATLAB

To temporarily set your MATLAB working directory, use the following procedure:

  1. In the MATLAB Command Window, type
  2. To check your working directory, type

To permanently set working directory, see Setting from the Desktop Icon.


  Files on the Host PC Computer Serial Communication