I have a MATLAB function that utilizes the "usastatelo.shp" shapefile to plot the map of the all the states in the US. The contents of the function file are shown below:
function testfigure; ax = usamap('conus');set(ax, 'Visible', 'off');states = shaperead('usastatelo', 'UseGeoCoords', true,'Selector',{@(name) ~any(strcmp(name,{'Alaska','Hawaii'})), 'Name'});names = {states.Name};indexConus = 1:numel(states);stateColor = [0.5 1 0.5];geoshow(ax(1), states(indexConus), 'FaceColor', stateColor);
In order to deploy this code onto a machine which does not have MATLAB installed, I use the MCC command:
mcc -m test
to create a stand-alone executable, using the MATLAB Compiler.
However, when I try to test the executable by running the following command from the MATLAB command prompt:
!test
I receive the following error message:
ERROR: Error in ==> mapformats\private\openShapeFiles at 19 Error in ==> shaperead at 204 Error in ==> example_track at 5 ??? Error using ==> mapformats\private\openShapeFiles>checkSHP Failed to open both usastatelo.shp and usastatelo.SHP. map:openShapeFiles:failedToOpenSHP1
Best Answer