Subject: Marine Geospatial Ecology Tools (MGET) help
Text archives
- From: Jason Roberts <>
- To: Nathan Weideman <>, "" <>
- Subject: RE: [mget-help] Using Matlab in Arc Map
- Date: Fri, 20 May 2016 08:48:48 +0000
- Accept-language: en-US
- Authentication-results: yahoo.com; dkim=none (message not signed) header.d=none;yahoo.com; dmarc=none action=none header.from=duke.edu;
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:23
Hi Nathan,
The method that MGET uses to invoke Matlab code is fairly complicated. An important requirement was that we wanted users to be able to run Matlab-implemented functionality without having to purchase a copy of Matlab. To do that, we used the Matlab Compiler to produce a C library that can be used so long as the correct version of the free Matlab Component Runtime (MCR). In order to execute functions in the C library, we developed C code that wrapped those functions in a Python extension module that allows C to be called form Python. A central aspect to this was writing C code that translates Python numpy arrays to and from Matlab C structures.
For your scenario, this complexity is probably not necessary. Assuming you have a full copy of Matlab, it would be much easier to execute your Matlab scripts via the command line. I can imagine three options for this:
1. You could write your own Python-based tools in ArcGIS. You’d use Python functions in the subprocess module. 2. You could try calling the subprocess functions directly from ArcGIS using the Python window. 3. You could use the MGET tool called Execute Program (in the ArcToolbox window it is under MGET, Data Management, Programs).
I hope this helps,
Jason From: [mailto:]
On Behalf Of Nathan Weideman
Hello, I was looking for a way to use Matlab in ArcMap. I saw that you had already solved this problem. I want to be able to call any matlab script though, not just the specific scripts that are in MGET. Do you have, or know where there is, the python scripts to do this for ArcMap? Thank you, Nathan To unsubscribe from this list, visit: https://lists.nicholas.duke.edu/sympa/ca/initiate_unsubscribe/mget-help/jason.roberts%40duke .edu |
- [mget-help] Using Matlab in Arc Map, Nathan Weideman, 05/17/2016
- RE: [mget-help] Using Matlab in Arc Map, Jason Roberts, 05/20/2016
Archive powered by MHonArc 2.6.19.