what will be next command line for putting lat long value n figure?

Here matrix of 130*110 want to give latitude and longitude value from
lon=42:-(42-40)/109:40;
lat=315:(317-315)/129:317;
[x,y]=meshgrid(lon,lat);
what will be next command line for putting lat long value n figure?
outside the figure value of lat/long is not there I want to put lat/long value there?

3 件のコメント

the cyclist
the cyclist 2013 年 8 月 25 日
Can you please give more detail? Do you want to put lines at those values, or do you want to write text at those values?
Your current axes run from 1:8 (I think). How do you want to match those values up to your lat and lon?
However you do this, you are trying to put a lot of "ink" on that figure, which I think will obscure what you are doing.
Image Analyst
Image Analyst 2013 年 8 月 25 日
編集済み: Image Analyst 2013 年 8 月 25 日
S, you don't need to put "matlab" or "matlab code" as tags since every question here is on matlab and matlab code. Read a guide to tags
Do you just want to change the tick marks outside the image so that they read the "real world" lat/lon numbers instead of pixel values?
RS
RS 2013 年 8 月 25 日
yes outside that value should be lat/long but how can I do to come this figure in real world?

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

回答 (1 件)

Image Analyst
Image Analyst 2013 年 8 月 25 日

0 投票

This is completely explained, with several examples, in the documentation. For example:
x = -pi:.1:pi;
y = sin(x);
plot(x,y)
set(gca,'XTick',-pi:pi/2:pi)
set(gca,'XTickLabel',{'-pi','-pi/2','0','pi/2','pi'})
Browse, in the help, to MATLAB->Graphics->formatting and Annotation->Coordinate System->Setting Axis Parameters. Or search for ticks and select "Setting Axis Parameters" from the list.

5 件のコメント

Walter Roberson
Walter Roberson 2013 年 8 月 25 日
Well, except for projection issues, as the above code and reference assumes orthogonal projection. We have to wonder if the question has to do with the Mapping Toolbox.
RS
RS 2013 年 8 月 29 日
yes if there I have to give projection so how can I proceed?
Walter Roberson
Walter Roberson 2013 年 8 月 29 日
Do you have access to the Mapping Toolbox?
RS
RS 2013 年 8 月 30 日
No How can I access?
Walter Roberson
Walter Roberson 2013 年 8 月 30 日
The Mapping Toolbox is optional extra-cost. I do not recall the cost at the moment. Your profile hints you are at a university. If you are a student you can add the Mapping Toolbox on to your Student Version license for about $US30. If you are faculty or staff at the university, you can get the Mapping Toolbox at Academic pricing.

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

質問済み:

RS
2013 年 8 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by