Products & Services Solutions Academia Support User Community Company

Learn more about Real-Time Windows Target   

Initial Working Directory

Working Directory Location Requirement

Set your MATLAB working directory outside the MATLAB root directory. The default MATLAB root directory is c:\matlabN, where N is the MATLAB version number.

Setting the Working Directory from the Desktop Icon

Your initial working directory is specified in the shortcut file you use to start the MATLAB environment. 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 the MATLAB environment to use initially outside the MATLAB root directory.

  3. Click OK, and then start the MATLAB environment. To check your working directory, type

    pwd or cd
    

Setting the Working Directory from the MATLAB Environment

Use the following procedure as an alternative, but temporary, procedure for setting your MATLAB working directory:

  1. In the MATLAB Command Window, type

    cd c:\mwd
    
  2. Check the current working directory, type

    cd

    The MATLAB Command Window displays

    ans = c:\mwd or c:\mwd

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS