m_proj error with strcmp(map_projection...

Error using strcmp Too many input arguments.
Error in m_proj (line 105) if strcmp(MAP_PROJECTION.version.Name,'Octave')

6 commentaires

KALYAN ACHARJYA
KALYAN ACHARJYA le 28 Sep 2018
Code?
ANKUR KUMAR
ANKUR KUMAR le 28 Sep 2018
Please attach the your codes too to get help in an effective way.
Chad Greene
Chad Greene le 17 Oct 2018
Note: the m_proj function is part of M_Map, not Matlab's Mapping toolbox.
Hello everyone. I got the same problem as Tumelo Maja :
Error using strcmp
Too many input arguments.
Error in m_proj (line 105)
if strcmp(MAP_PROJECTION.version.Name,'Octave')
since i started to use m_map 1.4j (released May/2018).
i tried to go back to older versions, but the problem remains the same.
This is my code :
%plot results
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ax1 = subplot(4,2,[1 2 5 6]) %PV ertel
m_proj('mercator','lon',[0 12],'lat',[0 11])
m_pcolor(lonpv,latpv,PV(:,:,Kplot)'), shading flat, caxis([-2e-7 2e-7])
ax11 = colorbar;
title(ax11,{'PV (s^-^1 m^-^1)'}); colormap(ax1,bluewhitered(1024));
hold on
m_contour(lonpv,latpv,PV(:,:,Kplot)',50,'k')
hold off
title('PV Ertel');xlabel('Longitude (°E)');ylabel('Latitude (°N)')
ax2 = subplot(4,2,[3 4 7 8]) % PV rescaled
m_proj('mercator','lon',[0 12],'lat',[0 11])
m_pcolor(lonpv,latpv,PV_r(:,:,Kplot)'), shading flat, caxis([-2e-4 2e-4])
ax22 = colorbar;
title(ax22,{'PV_r (s^-^1 m^-^1)'}); colormap(ax2,bluewhitered(1024));
hold on
m_contour(lonpv,latpv,PV(:,:,Kplot)',50,'k')
hold off
title('PV rescaled');xlabel('Longitude (°E)');ylabel('Latitude (°N)')
In attached (photo), another use of m_map toolbox function with the same error massage.
error_message_m_map.jpg
Thank's to all for further help and answers !!!
Rik
Rik le 13 Mai 2019
I think you are better off posting your own question. Before you do, read the advice here: https://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer
You are using an old version. The current m_proj from https://www.eoas.ubc.ca/~rich/map.html#download has that code at line 140.
In the meantime, please show us the result you get from executing
v = ver('matlab')
There were some obscure cases in which ver could report more than one thing for MATLAB

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur MATLAB Coder dans Centre d'aide et File Exchange

Produits

Version

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by