Help me plotting contour using contourf on 3 columns of data

Please help, i have 3 columns of data that consist of x(horizontal position), y(vertical position), and z (value at x,y position).
i want to make a contour plot like this: http://flic.kr/p/bqR4fT
but what i kept getting is random colour of lines like this http://flic.kr/p/bqR4ee
im already doing the
[XI,YI]=meshgrid(x,y) ZI=griddata(x,y,z,XI,YI,'nearest') %nearest neighbour contourf(XI,YI,ZI)
what did i do wrong?
thank you anyway, regards

Answers (0)

Asked:

on 9 Feb 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!