Back to Browse

STK Tip: Getting Started with Matlab

8.0K views
May 14, 2019
7:36

Jens Ramrath, Sr. Systems Engineer, quickly explains how to get started integrating STK and Matlab. Here is Jens' code: %%%%% establish connection between STK and Matlab %%%%% % option 1: start up a new instance of STK % uiApplication = actxserver('STK11.application'); % uiApplication.Visible = 1; % uiApplication.UserControl = 1; % option 2: connect to running instance of STK uiApplication = actxGetRunningServer('STK11.application'); % get the root object root = uiApplication.Personality2; %%%%% interact with scenario %%%%% sc = root.CurrentScenario % new facility fac = sc.Children.New('eFacility', 'OMFac'); fac.Position.AssignGeodetic(12.345, 123.456, 0.0); % do this in a loop for lat = 0:5 for lon = 0:5 thisPlaceName = ['ThisPlace_' num2str(lat) '_' num2str(lon)]; thisFac = root.CurrentScenario.Children.New('eFacility', thisPlaceName); thisFac.Position.AssignGeodetic(lat, lon, 0.0); thisFac.Graphics.Color = '0,255,0'; end end

Download

0 formats

No download links available.

STK Tip: Getting Started with Matlab | NatokHD