Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
How to import a figure with Lon and Lat

Subject: How to import a figure with Lon and Lat

From: Liqing

Date: 12 Feb, 2008 16:15:03

Message: 1 of 4

Hi,

I'm trying to import a *jpg map file into Matlab as a map.
Is there a way that I can first load the file and then tell
Matlab the uppermost, lowermost Latitudes, and leftmost and
rightmost Longitudes, so that I can plot more data points on
the figure?

Thank you very much!

LQ

Subject: How to import a figure with Lon and Lat

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 12 Feb, 2008 17:28:04

Message: 2 of 4

In article <fosgm7$jh3$1@fred.mathworks.com>,
Liqing <liqingj@gmail.com> wrote:

>I'm trying to import a *jpg map file into Matlab as a map.
>Is there a way that I can first load the file and then tell
>Matlab the uppermost, lowermost Latitudes, and leftmost and
>rightmost Longitudes, so that I can plot more data points on
>the figure?

help image

    IMAGE(X,Y,C), where X and Y are vectors, specifies the locations
    of the pixel centers of C(1,1) and C(M,N). Element C(1,1) is
    centered over (X(1), Y(1)), element C(M,N) is centered over
    (X(end), Y(end)), and the pixel centers of the remaining elements
    of C are spread out evenly between those two points, so that the
    rectilinear patches are all of equal width and height.

--
   So you found your solution
   What will be your last contribution?
   -- Supertramp (Fool's Overture)

Subject: How to import a figure with Lon and Lat

From: Liqing

Date: 12 Feb, 2008 18:40:04

Message: 3 of 4

Hi Roberson,

Thank you for the reply! I appreciate your help very much. I
will try this out.


roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in
message <foskv4$drp$1@canopus.cc.umanitoba.ca>...
> In article <fosgm7$jh3$1@fred.mathworks.com>,
> Liqing <liqingj@gmail.com> wrote:
>
> >I'm trying to import a *jpg map file into Matlab as a map.
> >Is there a way that I can first load the file and then tell
> >Matlab the uppermost, lowermost Latitudes, and leftmost and
> >rightmost Longitudes, so that I can plot more data points on
> >the figure?
>
> help image
>
> IMAGE(X,Y,C), where X and Y are vectors, specifies the
locations
> of the pixel centers of C(1,1) and C(M,N). Element
C(1,1) is
> centered over (X(1), Y(1)), element C(M,N) is centered
over
> (X(end), Y(end)), and the pixel centers of the
remaining elements
> of C are spread out evenly between those two points,
so that the
> rectilinear patches are all of equal width and height.
>
> --
> So you found your solution
> What will be your last contribution?
> -- Supertramp (Fool's Overture)

Subject: How to import a figure with Lon and Lat

From: Liqing

Date: 12 Feb, 2008 20:12:02

Message: 4 of 4

Hi Roberson,

Thanks again for the help. I've finally figured this out. I
just used the following code:

img = imread('Clip.bmp');
image([-180 180],[90 -90],img)
axis xy

That's awesome!



"Liqing " <liqingj@gmail.com> wrote in message
<fosp64$8fc$1@fred.mathworks.com>...
> Hi Roberson,
>
> Thank you for the reply! I appreciate your help very much. I
> will try this out.
>
>
> roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in
> message <foskv4$drp$1@canopus.cc.umanitoba.ca>...
> > In article <fosgm7$jh3$1@fred.mathworks.com>,
> > Liqing <liqingj@gmail.com> wrote:
> >
> > >I'm trying to import a *jpg map file into Matlab as a map.
> > >Is there a way that I can first load the file and then tell
> > >Matlab the uppermost, lowermost Latitudes, and leftmost and
> > >rightmost Longitudes, so that I can plot more data
points on
> > >the figure?
> >
> > help image
> >
> > IMAGE(X,Y,C), where X and Y are vectors, specifies the
> locations
> > of the pixel centers of C(1,1) and C(M,N). Element
> C(1,1) is
> > centered over (X(1), Y(1)), element C(M,N) is centered
> over
> > (X(end), Y(end)), and the pixel centers of the
> remaining elements
> > of C are spread out evenly between those two points,
> so that the
> > rectilinear patches are all of equal width and height.
> >
> > --
> > So you found your solution
> > What will be your last contribution?
> > -- Supertramp (Fool's Overture)
>

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us