Comments on: Advanced MATLAB: Surface plot of nonuniform data https://blogs.mathworks.com/pick/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/?s_tid=feedtopost Jiro and Sean share favorite user-contributed submissions from the File Exchange. Wed, 18 May 2016 15:42:35 +0000 hourly 1 https://wordpress.org/?v=6.2.2 By: Reese https://blogs.mathworks.com/pick/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-14706 Fri, 14 Sep 2012 22:34:50 +0000 https://blogs.mathworks.com/pick/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-14706 I am also trying to make a 3D plot similar to the the one above. How would I do this if I dont have a function for z.

]]>
By: Traore https://blogs.mathworks.com/pick/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-14620 Thu, 12 Jul 2012 18:09:02 +0000 https://blogs.mathworks.com/pick/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-14620 I also have three data colunn, X, Y, Z as:
X Y Z
0.1 0 90
3.5 0 45
4.9 0 65
6.2 0 40
7 0 55
9 0 25
9 5 55
9 3 48
9 7 45
6.5 7 75
4.5 7 50
2.9 7 75
1.3 7 52
0 7 70
0 4.1 90
0 2.1 105
1.7 5.6 75
2.2 4.5 66
2.5 3.6 60
2.9 2.4 55
3.2 1.1 50
1.6 6.6 60
4.7 1 66
4.6 1.6 70
4.5 2.5 80
4.6 3.6 95
4.5 4.2 80
4.3 5.1 70
4.4 6 60
5.3 5.3 78
6 5.7 88
6.9 5.6 102
7.1 5 104
7 3.5 90
6.9 2.7 80
6.9 1.9 70
7 0.6 60
6 1 51
6 2 54
5.9 3 60
6 4 64
6.3 4.8 71
3 6 75
4 4.5 75
5 4.5 73
0.6 5 80
1.8 2 70

Anyone can assist me to plot mesh or surface plot in 3D. Thanks

]]>
By: Julie https://blogs.mathworks.com/pick/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-14524 Mon, 14 May 2012 10:05:35 +0000 https://blogs.mathworks.com/pick/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-14524 Hello,

The code works well, but for relatively small arrays.
I have over 300,000 points, so griddata doesn’t have enough memory to handle the data.
TriScatteredInterp doesn’t work well for me too, because the surface it generates isn’t smooth.

Any suggestions for me?

]]>
By: Prabhat Man Sainju https://blogs.mathworks.com/pick/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-14471 Thu, 05 Apr 2012 13:28:30 +0000 https://blogs.mathworks.com/pick/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-14471 Hi,

I have a set of x,y,z data. The data is mainly SNR,RSRP and Throughput in x,y,z dimensions respectively. While i perform the steps you’ve mentioned, i get the following error:

??? Error using ==> DelaunayTri
The input points must contain finite values; Inf and NaN are not permitted.

Error in ==> griddata>cubic at 200
dt = DelaunayTri([x(:) y(:)]);

Error in ==> griddata at 136
zi = cubic(x,y,z,xi,yi);

Can you help me with it?

]]>
By: Andrea https://blogs.mathworks.com/pick/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-14450 Thu, 15 Mar 2012 19:28:31 +0000 https://blogs.mathworks.com/pick/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-14450 Thanks for the fantastic demonstration. I tried to figure out how to generate surface plots for non-uniform data a couple of times before but never found somebody who was able to explain it to me. I got it know and my surface plot looks fantastic. At those moments I love the internet and the helpful guys like you who give their time to help me understand…
Thank you so much.

]]>
By: Mike https://blogs.mathworks.com/pick/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-14431 Wed, 22 Feb 2012 22:26:38 +0000 https://blogs.mathworks.com/pick/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-14431 Hi;
I have written the following script based on your lesson. The surface which i end up in seems not be correctly reflect the data point i have. Would you please have a look and tell me what could be wrong here?

X1=[7 8 10 12 8 10 12 12 12 12 12];
Y1=[15.8 16.8 17.8 18.8 17.8 17.8 17.8 15.8 16.8 17.8 18.8];
Z1=[12.6 16.2 36 57.9 47.4 36 30.1 16.4 25.7 30.1 57.9];

CLF();
Xlin=linspace(min(X1),max(X1),30);
Ylin=linspace(min(Y1),max(Y1),30);
[X,Y]=meshgrid(Xlin,Ylin);
Z=griddata(X1,Y1,Z1,X,Y,’Cubic’);
mesh(X,Y,Z);
%axis tight, hold off
%plot3(X1,Y1,Z1,’.’,’Markersize’,15)
%surf(X,Y,Z);

]]>
By: hadi https://blogs.mathworks.com/pick/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-14366 Tue, 13 Dec 2011 20:29:25 +0000 https://blogs.mathworks.com/pick/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-14366 they are bathymetric data which x and y are coordinations and z is the depth at that point
i need contour lines of z value

]]>
By: hadi https://blogs.mathworks.com/pick/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-14365 Tue, 13 Dec 2011 19:20:48 +0000 https://blogs.mathworks.com/pick/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-14365 hello
i have 3 sets o data x,y,z and they are nonuniform
how can i make a contour plot of z values?

]]>
By: Doug https://blogs.mathworks.com/pick/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-14262 Mon, 10 Oct 2011 15:44:01 +0000 https://blogs.mathworks.com/pick/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-14262 @Faiz

X is a vector of random numbers 100×1. It is then multiplied by 16 and 8 is subtracted from it.

xlin is a vector of lineraly spaced numbers (33 in total) that range from the minimum to the maximum of x.

]]>
By: faiz https://blogs.mathworks.com/pick/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-14261 Sat, 08 Oct 2011 14:18:51 +0000 https://blogs.mathworks.com/pick/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-14261 i like to use this program..but can someone explai to me, what the number meant ,100,1,16,8 and 33 for below..

x=rand(100,1)*16-8;
y=rand(100,1)*16-8;
xlin=linspace(min(x),max(x),33);

i try to run randomly, but appear error with “cubic” like
The input character is not valid in MATLAB statements or expressions.

Thanks

]]>