|
hello;
I need to plot contour using existing x,y,z data.
Only thing I have is following x,y,z data as a text file.
x y z
0 , 0 , 0.0752
0 , 0.0200 , 0.0752
0 , 0.0300, 0.0749
0.0100 , 0 , 0.0744
0.0100 , 0.0100 , 0.0741
0.0200 , 0 , 0.0741
0.0200 , 0.0200 , 0.0748
0.0300 , 0 , 0.0747
0.0300 ,0.0300, 0.0743
0.0410 , 0 , 0.0736
0.0410 , 0.0300 , 0.0738
0.0500 , 0 , 0.0732
0.0600 , 0 , 0.0728
0 , 0.1130 , 0
0.0410 , 0.0410 , 0
0.0650 , 0 , 0
0.0700 , 0 ,-0.0302
0.0800 , 0 , -0.0304
0.0900 , 0 , -0.0306
0.0410 , 0.0500 , -0.0330
0.0410 , 0.0600 , -0.0330
0.0500 , 0.0500 , -0.0331
0.0500 , 0.0600 , -0.0331
0.0500 , 0.0500 , -0.0332
From help menu, I found that there is a command called contour to perform this task.
But I cannot understand how to do it from my existing data.
I aim to plot the area where z<0 and the area where z>0 ; for this I thihk that good to use contour.;
this is what I did
xlin=linspace(min(x),max(x),33);
ylin=linspace(min(y),max(y),33);
[X,Y]=meshgrid(xlin,ylin)
Z=griddata(x,y,z,X,Y)
[c,h]=contourf(X,Y,Z,[0 0 ]);
is that ok?
thanks
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
|