How do I connect up points in 3D plot (Or how do surf without a function)?

3 次查看(过去 30 天)
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

采纳的回答

KSSV
KSSV 2017-4-12
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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by