From: Simona on
In the past, I have used m map to successfully plot streamlines on a map. I am currently having trouble with this command line however (m_ll2xy is a function in the m map directory):

[slon slat]=meshgrid(180:5:360,0:5:30);
[sx sy]=m_ll2xy(slon,slat);

I am getting this error:

??? Attempt to reference field of non-structure array.

Error in ==> m_ll2xy at 33
if strcmp(MAP_COORDS.name,MAP_PROJECTION.coordsystem.name),

Error in ==> uv_plot at 228
[x y]=m_ll2xy(lon,lat);

I went to an mmap help page (http://www.eos.ubc.ca/~rich/map.html) where they give an example for this command:

[MAPX,dm]=m_ll2xy([279.26 350.03],[33.92 34.35],'clip','off');

which I copied and pasted into my command window-and resulted in the same error.

Any ideas would be appreciated!
From: TideMan on
On Jul 15, 2:41 pm, "Simona " <srol...(a)email.arizona.edu> wrote:
> In the past, I have used m map to successfully plot streamlines on a map. I am currently having trouble with this command line however (m_ll2xy is a function in the m map directory):
>
> [slon slat]=meshgrid(180:5:360,0:5:30);
> [sx sy]=m_ll2xy(slon,slat);
>
> I am getting this error:
>
> ??? Attempt to reference field of non-structure array.
>
> Error in ==> m_ll2xy at 33
>   if strcmp(MAP_COORDS.name,MAP_PROJECTION.coordsystem.name),
>
> Error in ==> uv_plot at 228
> [x y]=m_ll2xy(lon,lat);
>
> I went to an mmap help page (http://www.eos.ubc.ca/~rich/map.html) where they give an example for this command:
>
> [MAPX,dm]=m_ll2xy([279.26 350.03],[33.92 34.35],'clip','off');
>
> which I copied and pasted into my command window-and resulted in the same error.
>
> Any ideas would be appreciated!

You haven't specified the map projection.
help m_proj