How to find data points from a 3D plotted graph in MATLAB

2 views (last 30 days)
i have plotted a 3D bezier surface, i need to find values of Y for particular values of X and Z. how do i find it. Please hlep me its urgent.
here is my program
Bx=[0 0;20 20;40 40;50 50;70 70;80 80;100 100];
By=[2.181 2.3;1.909 1.821;1.324 1.6; 1.168 1.5;1.85 1.646; 4.2 2.415; 5 3.112];
Bz=[0.4 0.2;0.4 0.2;0.4 0.2;0.4 0.2;0.4 0.2;0.4 0.2;0.4 0.2];
N = [1 -6 15 -20 15 -6 1; -6 30 -60 60 -30 6 0; 15 -60 90 -60 15 0 0; -20 60 -60 20 0 0 0; 15 -30 15 0 0 0 0; -6 6 0 0 0 0 0; 1 0 0 0 0 0 0];
M = [-1 1; 1 0];
i=1;
for u= linspace(0,1)
for v= linspace(0,1)
U=[u^6,u^5,u^4,u^3,u^2,u,1];
V=[v,1];
x(i)= U*N*Bx*M'*V';
y(i)= U*N*By*M'*V';
z(i)= U*N*Bz*M'*V';
i=i+1;
end
end
plot3(x,y,z)

Accepted Answer

darova
darova on 3 Jul 2020
use griddata
y1 = griddata(X,Z,Y,x1,z1);

More Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Tags

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!