Path: news.mathworks.com!not-for-mail
From: "helper " <spamless@nospam.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: contour plots in matlab
Date: Mon, 5 May 2008 00:06:05 +0000 (UTC)
Organization: Timothy S. Farajian, Inc.
Lines: 22
Message-ID: <fvlj1d$902$1@fred.mathworks.com>
References: <22388087.1209942773264.JavaMail.jakarta@nitrogen.mathforum.org>
Reply-To: "helper " <spamless@nospam.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1209945965 9218 172.30.248.37 (5 May 2008 00:06:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 5 May 2008 00:06:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1272923
Xref: news.mathworks.com comp.soft-sys.matlab:466576


sunil <sunilpatilhere@gmail.com> wrote in message 
<22388087.1209942773264.JavaMail.jakarta@nitrogen.mathforum.
org>...
> hi frnds, 
> I have three vectors x,y,z.
> z=f(x,y).
> 
> I would like to plot contour plot of this data.
> 
> just like i used to do with origin... (set z as Z-axix 
and then creat matrix (gridding) and then simply say plot 
contour.)
> 
> Is there anything in matlab similar to it.
> 
> thanks in advance
> sunil

Use the MESHGRID function to create a mesh of points in the 
xy-plane.  Next, use the GRIDDATA function to evaluate z at 
these meshed points.  Then, use the CONTOUR function to 
generate and plot the contour.