Sorry, See the image above^
How to surf semi-random X, Y, Z data
1 view (last 30 days)
Show older comments
So the the question is pretty straight forward. I have X, Y, and Z data that I want to mesh. My code is as follows:
if true
XYZ = xlsread('test.xlsm','Sheet1')
X=XYZ(:,2);
Y=XYZ(:,1);
Z=XYZ(:,3);
[Xi,Yi] = meshgrid(92:0.01:94, -29:0.01:-34);
Zi = griddata(X,Y,Z,Xi,Yi);
surf(Xi,Yi,Zi);
end
The data ranges are as follows: X: ~90 to 96, Y: ~28 to -34, and Z: 0 to 1. (See the attached image of a scatter plot of the data). When I run the above code, however, it returns a blank plot with nothing in it. I can't see what I am doing wrong. Any help is appreciated.
0 Comments
Answers (1)
See Also
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!