I just installed the mapping toolbox In running the example referenceSphere can not resolve superclass map.geodesy.Sphere.

12 ビュー (過去 30 日間)
I get the following error running the example code:
>> worldmap world
Error using referenceSphere
The specified superclass 'map.geodesy.Sphere' contains a parse error, cannot be found on MATLAB's search path, or
is shadowed by another file with the same name.
Error in regionmap (line 51)
e = referenceSphere('earth','meters');
Error in worldmap (line 122)
ax = regionmap(mfilename, varargin);
MATLAB Version: 9.8.0.1323502 (R2020a)
MATLAB License Number: 874794
Operating System: Microsoft Windows 10 Enterprise Version 10.0 (Build 19042)
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.8 (R2020a)
Antenna Toolbox Version 4.2 (R2020a)
Mapping Toolbox Version 4.10 (R2020a)
Signal Processing Toolbox Version 8.4 (R2020a)
  2 件のコメント
Steven Lord
Steven Lord 2021 年 7 月 28 日
Can you show us what the following commands display?
which -all worldmap
which -all regionmap
which -all referenceSphere
which -all map.geodesy.Sphere
Paul Martellock
Paul Martellock 2021 年 7 月 30 日
>> which -all worldmap
which -all regionmap
which -all referenceSphere
which -all map.geodesy.Sphere
C:\Program Files\MATLAB\R2020a\toolbox\map\mapdisp\worldmap.m
C:\Program Files\MATLAB\R2020a\toolbox\map\mapdisp\private\regionmap.m % Private to mapdisp
C:\Program Files\MATLAB\R2020a\toolbox\map\mapgeodesy\referenceSphere.m % referenceSphere constructor
'map.geodesy.Sphere' not found.

サインインしてコメントする。

採用された回答

Kojiro Saito
Kojiro Saito 2021 年 8 月 5 日
In R2020a,
which -all map.geodesy.Sphere
will return the following file.
MATLAB_INSTALL\toolbox\shared\mapgeodesy\+map\+geodesy\Sphere.m % map.geodesy.Sphere constructor
toolbox\shared\mapgeodesy folder is created when Mapping Toolbox is installed.
Please confirm toolbox\shared\mapgeodesy\+map\+geodesy\Sphere.m does exist, if it exists, it seems the foloder was removed fomr MATLAB search paht.
So, you will need to do addpath
addpath('C:\Program Files\MATLAB\R2020a\toolbox\shared\mapgeodesy')
savepath
Or reset MATLAB search path to the initial conditions.
restoredefaultpath
If toolbox\shared\mapgeodesy folder does not exist, there might something wrong in your installation. So you need to install Mapping Toolbox again.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

タグ

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by