How do I call a Matlab script with Model Builder?

6893
4
05-17-2016 06:44 AM
nathanweideman
New Contributor

I see the ESRI help for R, but not sure on how to modify to call Matlab.  I assume somebody has already posted the solution, and I'm just blind.

Tags (2)
0 Kudos
4 Replies
DanPatterson_Retired
MVP Emeritus

matlab isn't natively reported, you would have a better chance by changing it to python with or without numpy since python and its like are supported directly without heroics.

0 Kudos
AdrianWelsh
MVP Honored Contributor

Nathan,

I would second what Dan mentioned. I am not sure you can use matlab in ModelBuilder. Even going the Python route seems a little complicated. I tried looking some resources up but did not find much:

MATLAB Engine API for Python - MATLAB & Simulink (not sure about this one)

This is a research paper that uses Python, Matlab, R, ArcGIS, etc, though I do not have access to view this paper so I am not sure how deep they go into how they integrated it all: Marine Geospatial Ecology Tools: An integrated framework for ecological geoprocessing with ArcGIS, P...

0 Kudos
nathanweideman
New Contributor

Why can I use R in model builder, but not matlab?  Just curious.

I have years worth of matlab scripts that I'd like to use.  I'm not a coder; I'm a math/physics guy who can use C.  Python is a bit different, and numpy doesn't even come close to the usefulness/stability/ease of use of matlab.

I've used the selection process to export txt files (.txt but set up as .csv) and then run them in matlab.  Matlab has the ability to pull data from .xlsx/csv files and then output .xlsx/csv.  I then import back into arc map.  It seems like I should be able to use the model builder to automate this process.  If I was more adept at python/numpy, I'd probably try to convert the matlab functions over.

I'm using arcmap to graphically model the data, and other programs to modulate.  I do track reconstruction for unmanned vehicles.

Thanks for the help.  I'm trying to learn what my options are so I can fix the process we use.  It takes days to do things that should be hours.

0 Kudos
DanPatterson_Retired
MVP Emeritus

numpy/scipy/matplotlib is the route to go.  I dont know where you got the idea that numpy and its siblings were unstable...couldn't be remotely farther from the truth.  It you can matlab, then you can R, Fortran, c, numpy, scipy or Julia... Translation of the bones is surely not an issue, the interface is the fluff.  If you have some translation stuff that you need doing we could help. 

0 Kudos