m_proj error with strcmp(map_projection...
Show older comments
Error using strcmp Too many input arguments.
Error in m_proj (line 105) if strcmp(MAP_PROJECTION.version.Name,'Octave')
6 Comments
KALYAN ACHARJYA
on 28 Sep 2018
Code?
ANKUR KUMAR
on 28 Sep 2018
Please attach the your codes too to get help in an effective way.
Chad Greene
on 17 Oct 2018
Note: the m_proj function is part of M_Map, not Matlab's Mapping toolbox.
Fernand ASSENE
on 12 May 2019
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.

Thank's to all for further help and answers !!!
Rik
on 13 May 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
Walter Roberson
on 13 May 2019
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
Answers (0)
Categories
Find more on MATLAB Coder 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!