Surf plot error for 4 variable input

1 view (last 30 days)
Hillaryfor2016
Hillaryfor2016 on 18 Apr 2015
Commented: William on 19 Apr 2015
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 Comments
Hillaryfor2016
Hillaryfor2016 on 19 Apr 2015
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 on 19 Apr 2015
if you could upload the data that would be helpful

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!