m_proj question: unexpected error
11 次查看(过去 30 天)
显示 更早的评论
I have vector of lat and lon defined as:
lat = linspace(90,32,30);
lon = linspace(0,358,180);
I then do m_proj:
m_proj('equidistant,'lon',[lon(1) lon(end)],'lat',[lat(1),lat(end)]);
Then:
[x,y]=mll2xy(lon,lat);
This gives me an error of "inputs must have the same size". Any suggestions? I think I used this function before with success. Thank you!
0 个评论
回答(3 个)
Tom
2012-7-2
The clue's in the name- one is a 1x30 vector, the other's 1x180; you can make them the same size by setting the 3rd argument in linspace the same for both lat and lon.
0 个评论
Walter Roberson
2012-7-2
My guess is that you want
[Lat, Lon] = ndgrid(lat, lon);
[x,y] = mll2xy(Lon,Lat);
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!