From: carl on
In the help file it says:

"contour(Z) draws a contour plot of matrix Z, where Z is interpreted as
heights with respect to the x-y plane"

I have tried this:

Z = [2 3 3;
1 2 0];

[C,h] = contour(Z)
clabel(C,h);

which give me this:

http://img96.imageshack.us/img96/2312/contouru.jpg

But how does those line corresponds to elements in Z? From the help file its
supposed to mean the "heights" of Z but I don't understand this explanation.

From: Wayne King on
"carl" <carl@.com> wrote in message <4b995b76$0$279$14726298(a)news.sunsite.dk>...
> In the help file it says:
>
> "contour(Z) draws a contour plot of matrix Z, where Z is interpreted as
> heights with respect to the x-y plane"
>
> I have tried this:
>
> Z = [2 3 3;
> 1 2 0];
>
> [C,h] = contour(Z)
> clabel(C,h);
>
> which give me this:
>
> http://img96.imageshack.us/img96/2312/contouru.jpg
>
> But how does those line corresponds to elements in Z? From the help file its
> supposed to mean the "heights" of Z but I don't understand this explanation.

Hi Carl, if you read the section in the MATLAB User's Guide called "The Contouring Algorithm", it explains exactly what it's doing. Look under User's Guide -> Graphics -> Creating Specialized Plots -> Contour Plots

Hope that helps,
Wayne