0% found this document useful (0 votes)
138 views4 pages

InstallMATLAB PDF

This document provides instructions for setting up communication between MATLAB and STK. It outlines prerequisites and details the steps for installing STK after MATLAB or vice versa. The setup process involves running an installation executable, locating relevant files, and initializing the MATLAB interface using stkInit.

Uploaded by

ataalp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
138 views4 pages

InstallMATLAB PDF

This document provides instructions for setting up communication between MATLAB and STK. It outlines prerequisites and details the steps for installing STK after MATLAB or vice versa. The setup process involves running an installation executable, locating relevant files, and initializing the MATLAB interface using stkInit.

Uploaded by

ataalp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

MATLAB Setup Guide

Prerequisites
MATLAB 6.1 or higher
STK Integration license
Identify the STK install folder. The default is c:\Program Files\AGI\STK
<version number>.
Installing STK After MATLAB is Installed
To enable MATLAB/STK communication, the standard STK install process copies files to the
<MATLABROOT>\toolbox\local folder for each version of MATLAB presently installed
on your system.
Installing MATLAB After STK is Installed
To enable MATLAB-STK communication, anytime you install MATLAB after you have already
installed STK, whether it is for the first time or installing an updated MATLAB release, you will
need to run StkMatlabInstall.exe from <STK install folder>\Bin.
This application copies files to <MATLABROOT>\toolbox\local for each version of
MATLAB presently installed on your system.
First Time Setup
1) Open MATLAB and type agiInit('setup'). The following window will
appear. Click Continue.

2) Next you'll be prompted to locate the *.m files. Go to <STK install
folder>\MATLAB and click OK.

MATLAB Setup Guide 1
Note: When setting up with a MATLAB version prior to 6.5, you must browse
specifically to the file Mexconnect.m, and not simply the folder where that
file resides.

3) Next you'll be prompted to locate the AGI MEX-files. Go to <STK install
folder>\bin and click OK.
Note: When setting up with a MATLAB version prior to 6.5, you must browse
specifically to the file Mexconnect.dll, and not simply the folder where that
file resides.
Default MexConnect Host (Optional)
If STK and MATLAB are running on different computers (localhost:5001
assumes that STK is running on the same computer as MATLAB) or you want to use
a different port, you need to direct MATLAB to the STK host. To do that, click Yes in
the following dialog box:

and select the default MexConnect host (computer name and port of the computer).

Connect Initialization File (Optional)
If you want to modify the default settings, such as the command timeout, click Yes in
the following dialog box to configure a Connect initialization file:

MATLAB Setup Guide 2

and browse to <STK install folder>\Connect\PCData and click on the file
named Connect.dat.

Setup Confirmation
1) With MATLAB still open, start STK with no scenario (we will create one later). At the
MATLAB prompt type stkInit to initialize the MATLAB interface. If everything is in
order, you should see the following response or something similar:
>> stkInit
initializing MATLAB Interface with AGIDefault preferences
Warning: mexConnect: Connecting to localhost:5001
2) Now open a socket to STK.
>> conid = stkOpen
3) Create a scenario using the socket handle and the New Scenario Connect command.
>> stkExec(conid,'New / Scenario Scenario1')
4) STK will start up a new scenario.

MATLAB Setup Guide 3
MATLAB Help
Further MATLAB help is available in MATLAB. Try the following commands:
>> help stk
>> help mexConnect
>> help aerotoolbox


MATLAB Setup Guide 4

You might also like