How do I connect up points in 3D plot (Or how do surf without a function)?
3 views (last 30 days)
Show older comments
I've got a set of data I had intended to use to form a surface plot, however couldn't find how to do it without having the Z variable be a function. So instead I've had to use Plot3, which seems to show the data well enough, however would like to also connect the points along the y axis.
Alternatively a way to use surf with the data I have would be fantastic.
data = xlsread('MatlabAxial.xlsx','Sheet1','A110:AF159');
x=data(2:50,1);
y=data(1,2:32);
t=data(2:50,2:32);
[X, Y] = meshgrid(x,y);
plot3(X,Y,t,'k.:');
grid on
hold on

0 Comments
Accepted Answer
KSSV
on 12 Apr 2017
data = xlsread('Sample.xls');
x=data(2:50,1);
y=data(1,2:32);
t=data(2:50,2:32);
[X, Y] = meshgrid(x,y);
surf(X,Y,t');
grid on
hold on
More Answers (0)
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!