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

2 vues (au cours des 30 derniers jours)
abhinadan papnoi
abhinadan papnoi le 3 Juil 2020
Commenté : darova le 5 Juil 2020
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)

Réponse acceptée

darova
darova le 3 Juil 2020
use griddata
y1 = griddata(X,Z,Y,x1,z1);
  2 commentaires
abhinadan papnoi
abhinadan papnoi le 5 Juil 2020
Thank you so much brother, it worked perfectly. You saved me.
darova
darova le 5 Juil 2020
im jsut doing my job

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Tags

Produits


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by