Effacer les filtres
Effacer les filtres

How to plot 3d plane of type where one variable is missing like x + y = 0.....

1 vue (au cours des 30 derniers jours)
x = -2:.05:2;
y = -2:.05:2;
[X,Y] = meshgrid(x,y);
now how do i define Z to relate with X,Y to create plane so i can do surf(X,Y,Z) ?

Réponse acceptée

Matt J
Matt J le 18 Juin 2021
Modifié(e) : Matt J le 18 Juin 2021
If you mean that you have a plane equation of the form a*x+b*y+0*z=d, then you can use
obj=planarFit.groundtruth([],[a,b,0],d);
obj.showfit
xlabel X, ylabel Y, zlabel Z
  1 commentaire
Mesbahose Salekeen
Mesbahose Salekeen le 18 Juin 2021
i figured an easy way now
t = linspace(-1,1,50);
x = t;
z = linspace(-5,5,50);
[X,Z] = meshgrid(x,z);
Y = X;
surf(X,Y,Z)
this will create planer surface of x - y = 0

Connectez-vous pour commenter.

Plus de réponses (0)

Produits


Version

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by