Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!h14g2000pri.googlegroups.com!not-for-mail
From: NZTideMan <mulgor@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Depth VS longtitude plot
Date: Thu, 29 Oct 2009 12:09:35 -0700 (PDT)
Organization: http://groups.google.com
Lines: 69
Message-ID: <57f7238e-4287-4f2d-9582-287cc18d5775@h14g2000pri.googlegroups.com>
References: <hc9rej$9fd$1@fred.mathworks.com> <ae074e99-c746-4903-9ce2-0ef6d2269a81@o9g2000prg.googlegroups.com> 
	<49203056-695d-4c9c-bef3-64ec5a2975db@j4g2000yqe.googlegroups.com>
NNTP-Posting-Host: 202.78.152.105
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1256843375 22745 127.0.0.1 (29 Oct 2009 19:09:35 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 29 Oct 2009 19:09:35 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: h14g2000pri.googlegroups.com; posting-host=202.78.152.105; 
	posting-account=qPexFwkAAABOl8VUndE6Jm-9Z5z_fSpR
User-Agent: G2/1.0
X-HTTP-Via: 1.1 bc1
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.4) 
	Gecko/20091016 Firefox/3.5.4,gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:581116


On Oct 29, 10:06 pm, xiao <littledd...@gmail.com> wrote:
> On Oct 28, 9:17 pm, NZTideMan <mul...@gmail.com> wrote:
>
>
>
> > On Oct 29, 5:28 am, "nanxyzzz zhang" <littledd...@gmail.com> wrote:
>
> > >     Hi, everyone, i am new to matlab and I have a question.
> > >     i want to make a contour plot, the x axis is longitude and the Y axis is the depth.
> > >     The contour plot that i want to plot is 46*7 array.
> > >     I created the axis like this:
>
> > >    axesm('mercator','MapLonLimit',[-78.8 158])
> > >    depth=[50 70 100 140 190 240]
>
> > >      But I have no clue what i should do next. I tried to do it like
>
> > >    contourf(axesm,depth,plot)
>
> > >    but it does not work......  Can anyone give some clues?
>
> > >                                  Thank you very much
> > >                                                 XX
>
> > I assume your array is plot(46,7), correct?
> > This is a VERY BAD choice of variable name because plot is a
> > frequently-used function in Matlab, so next time you go to use it, you
> > will be screwed.
> > Apart from that, there are two reasons why it won't work:
> > 1.  Your depth has only 6 elements, where it should have 7 to match
> > plot(46,7)
> > 2.  You need to transpose the matrix plot, using plot' so that it has
> > dimensions 7x46
>
> Thank you very much NZ, I transposed my depth array and renamed the
> plot array to temperature.
> But it looks it still does not work. When I try it like this:
>
> contourf(axesm,depth,temperature)
>
> it gave me the error:
> ??? Undefined function or method 'almanac' for input arguments of type
> 'char'.
>
> Error in ==> axesmui>geoidupdate at 2724
>     geoidvec(n+1,:) = almanac(planet,param);
>
> Error in ==> axesmui>MainDialog at 228
>         [ptr,list] = geoidupdate(mstruct.zone,mstruct.geoid);
>
> Error in ==> axesmui at 109
>         eval([callback,'(''',action,''')'])
>
> Error in ==> axesmui at 62
>             axesmui('MainDialog','AxesEntries')
>
> Error in ==> axesm at 67
>    cancelflag = axesmui;
>
> Why is that? thank you very much
>
>                               XX

No, it's not contourf that's giving you that error, it's axesm.
I don't have that in my version of Matlab, so I can't help you.