MATLAB: HOW CAN I PLOT THE FOLLOWING POINTS USING SURFACE PLOT

3d plotsmesh gridsurface plot

(0, 0, 0.3), (1/4, 0, 1.1), (1/2, 0, 2), (3/4, 0, 1.5), (1, 0, 2); (0, 1/3, 0.3), (1/4, 1/3, 2), (1/2, 1/3, 1.8), (3/4, 1/3, 1.5), (1, 1/3, 2); (0, 2/3, 3), (1/4, 2/3, 2), (1/2, 2/3, 3), (3/4, 2/3, 3.3), (1, 2/3, 3); (0, 1, 2), (1/4, 1, 3), (1/2, 1, 2.5), (3/4, 1, 4), (1, 1, 4.5).

Best Answer

a={[0, 0, 0.3], [1/4, 0, 1.1], [1/2, 0, 2], [3/4, 0, 1.5], [1, 0, 2]...
[0, 1/3, 0.3], [1/4, 1/3, 2], [1/2, 1/3, 1.8], [3/4, 1/3, 1.5], [1, 1/3, 2]...
[0, 2/3, 3], [1/4, 2/3, 2], [1/2, 2/3, 3], [3/4, 2/3, 3.3], [1, 2/3, 3]...
[0, 1, 2], [1/4, 1, 3], [1/2, 1, 2.5], [3/4, 1, 4], [1, 1, 4.5]}
a=cell2mat(a')
x=reshape(a(:,1),5,[])
y=reshape(a(:,2),5,[])
z=reshape(a(:,3),5,[])
mesh(x,y,z)
%or
surf(x,y,z)
Related Question