Error while using the circlem function
4 views (last 30 days)
Show older comments
I am trying to draw a circle on a map using the circlem function, but I am getting the following error:
??? Undefined function or method 'earthRadius' for input arguments of type 'char'.
Error in ==> circlem at 95 [circlelat,circlelon] = scircle1(lat,lon,radius,[],earthRadius(units));
Error in ==> mapexample at 8 q = circlem(24.65,25.91,150, 'facecolor', 'red')
Kindly help me resolve the issue.
0 Comments
Answers (1)
Geoff Hayes
on 22 May 2015
Ojaswita - the circlem function (Chad Greene's FEX submission found here) makes use of the Mapping Toolbox which the earthRadius function is a part of. The error message
??? Undefined function or method 'earthRadius' for input arguments of type 'char'.
is telling you that either you don't have this function or it is not within the MATLAB search path. At the very least, you will need this toolbox, so in the Command Window, type
ver
to see your version of MATLAB and all installed products. Do you see the Mapping Toolbox in this list? If not, then you will need to purchase this software or find an alternative to the earthRadius function.
5 Comments
Geoff Hayes
on 4 Jun 2015
What are you replacing the earthRadius with? Have you tried stepping through the code (using the debugger) to figure out what is happening?
See Also
Categories
Find more on Data Import and Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!