Back

Data extraction into MATLAB made easy

While using STK via MATLAB, have you ever had an issue or difficulties extracting out data values because the lines look like this?

And it makes you look like this?

It is completely understandable that this may be really intimidating to someone starting, as the structure to extract information is very specific and takes time to learn the little idiosyncrasies of the STK programming interface. 

That being said, due to the complexity, you can instead use an easy-to-use data provider function! 

The function gives you the ability to just put in which data providers you are looking from within STK, and immediately pull the data out without having to have the specific structure correct! 

The function requires 8 different inputs for the function which may seem like a lot but it covers all the different data provider flavors so you can use this function for any data provider! 

They are listed below with a brief description. (A more in depth description is right within the function itself, as a read me): 

root – This is just the root of the STK interface you are in 

dataProvString – This is the main data provider folder you would see in STK’s data provider listing via the GUI 

dataProvElem – This is the grouping of specific elements within the data provider you are looking to extract 

times – The time start, stop, and time step for when the report should extract data for 

grouping – This is the subfolder in the data provider before reaching the data elements, which not all data providers have. You can leave it as an empty string if you have nothing. 

predata – Some data providers need predata to output info. This can be requesting another coordinate axes, data value, etc. You may not know your path, so the function has an option to request the predata via the GUI but still pull all the info into MATLAB 

object – The object you are extracting the data from 

Hopefully, this will help make your integration of STK with MATLAB much easier and will paint the way to extending your STK scenarios to push how far you can take your analysis! 

Here is a link to the function for use in MATLAB.

Author

Integration

Automate Systems Tool Kit (STK) and integrate it with other applications to extend its capabilities.

Systems Tool Kit (STK)

Modeling and simulation software for digital mission engineering and systems analysis.