How To: Set-up Matlab to control GMAT

MATLAB-specific help discussions.

How To: Set-up Matlab to control GMAT

Postby space_egd » Tue Jun 10, 2008 4:59 pm

After installing GMAT on your computer the following steps must be followed to ensure that the two programs work well with each other.

Instructions
For users that have admin privileges to their Matlab install directory

    - Close any open sessions of GMAT
    - Open Matlab
    (If you have multiple versions of Matlab on your computer load the version that is first in your path.
    The version of Matlab that GMAT launches when you right click the Matlab object located in the Resource tab and selecting Open is the first Matlab in the system's path.)
    - Click on File menu --> Set Path ...
    - Click the Add with Subfolders button
    - Select the matlab folder that is located in the GMAT executable directory and click OK

That's it. You're done. After the above steps, you should be able to drive GMAT from Matlab.
Go to the GMAT Matlab to GMAT tutorial Wiki page to test out if your setup is working correctly.

Instructions
For users that do not have admin privileges to their Matlab install directory

    - Close any open sessions of GMAT
    - Open Matlab
    (If you have multiple versions of Matlab on your computer load the version that is first in your path.
    The version of Matlab that GMAT launches when you right click the Matlab object located in the Resource tab and selecting Open is the first Matlab in the system's path.)
    - Click on File menu --> Set Path ...
    - Check to see if your administrator set-up Matlab to have a path included from on of the logged in user's write accessible folders (For windows users that would be a path like the following: C:\Documents and Settings\[Insert Username]\My Documents\MATLAB
    If not, have your administrator add a write accessible path that is available to all users and moved to the top of the Matlab path list.
    - Save the path settings and close the Set Path GUI panel
    - Create a startup.m file in the write accessible path that you had in the Matlab path
    - Add the following lines in the startup.m file:
    addpath('[Insert GMAT executable folder path here]/matlab')
    addpath('[Insert GMAT executable folder path here]/matlab/gmat_command')
    addpath('[Insert GMAT executable folder path here]/matlab/gmat_fmincon')
    addpath('[Insert GMAT executable folder path here]/matlab/gmat_keyword')

That's it. You're done. After the above steps, you should be able to drive GMAT from Matlab.
Go to the GMAT Matlab to GMAT tutorial Wiki page to test out if your setup is working correctly.
space_egd
 
Posts: 357
Joined: Sun Jun 08, 2008 9:02 pm
Location: MD

Return to MATLAB Help

Who is online

Users browsing this forum: No registered users and 2 guests