Countour Plot - Matlab

I want to generate a contour plot with 3 variables X,Y and Z, where the contour is colored by Z.

My code right now is

num = xlsread('filename')
x=num(:,1);
y=num(:,2);
z=num(:,3);
[x,y,z]=peaks;
contourf(x,y,z,10);

It generates a plot but I'm not sure if it colors XY by Z.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories