Surf plot error for 4 variable input

1 次查看(过去 30 天)
I have the following set of vectors, generated from a data set, each a length of 15120
Min/Max
x 0/1
y -3.5/1
z 25/220
v 0/0.8464
end
For each vector, each row represents a unique data point.
I think Im pretty much using the standard script for interpolating a surface between the data points;
if true
z=S2(:,1);
y=S2(:,3);
x=S2(:,4);
v=S2(:,2);
[xq,yq,zq]=meshgrid(0:0.05:1, -3.5:0.225:1, 25:9.75:220);
vq=griddata(x,y,z,v,xq,yq,zq);
surf(vq,zq,yq,xq);
end
this generates 21x21x21 grids for vq,xq,yq,zq which obviously dont work :(
In summary I really wish to plot a surface of V with respect to the three other variables. Any advice would be great. Thanks
  3 个评论
Hillaryfor2016
Hillaryfor2016 2015-4-19
Hi William, sorry for not getting back to you sooner. S2 is a 4x15120 variable from which I extract all of the other variables. So I ran simulations, whereby I vary x, y and z as independent variables and get a resultant variable of v. I covered all of the parameter space such that a 3x3 block is sampled everywhere.
William
William 2015-4-19
if you could upload the data that would be helpful

请先登录,再进行评论。

回答(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