How do I add a shapefile?

Undefined function or variable 'convertStringsToChars'.
Error in shaperead (line 201)
[varargin{:}] = convertStringsToChars(varargin{:});
I keep getting the error when trying to add the African map shapefile, how can rectrify this?

6 Comments

Can you share the shapefile
Please find the attached zip file
Whay you have is a xml file.......how did you try to read it?
What matlab version are you using? The convertStringsToChars() function became available in r2017b.
I started using R2018b then went lower to R2015a. Thanks, will use r2017b.
Adam Danz
Adam Danz on 7 Aug 2019
Edited: Adam Danz on 8 Aug 2019
That should fix the problem.
I'll move my comment to the answers section so your question appears as answered.

Sign in to comment.

Answers (1)

(continued from the comments section under the question).
The convertStringsToChars() function became available in r2017b. Check that your matlab release is prior to r2017b.
ver()

Products

Release

R2015a

Asked:

on 30 Jul 2019

Edited:

on 8 Aug 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!