MATLAB: I want to plot a 3d image of the set of values attached herewith. i am also enclosing the possible image that will be the output of the desired Matlab code.

3d plottingdata points plotting

Kindly share the Matlab code for the plot of the following set of 3 tuples values.

Best Answer

data = xlsread('Book1.xlsx') ;
x = data(:,1) ;
y = data(:,2) ;
z = data(:,3) ;
nx = length(unique(x)) ;
ny = length(unique(y)) ;
X = reshape(x,nx,ny) ;
Y = reshape(y,nx,ny) ;
Z = reshape(z,nx,ny) ;
surf(X,Y,Z)
shading interp
colorbar