Plotting a normal vector to a plane in matlab -


i'm trying plot vector normal plane doesn't show normal.this code

[x,y]=meshgrid(-10:1:10); r=5+2*(x-4)+4*(y-2); mesh(x,y,r) hold quiver3(4,2,5,2,4,-1) hold off

what doing wrong?

the vector normal plane. problem automatic axis scaling.

wrong scaling

use axis equal ensure data units have same length along each axis.

[x,y]=meshgrid(-10:1:10); r=5+2*(x-4)+4*(y-2); mesh(x,y,r) hold quiver3(4,2,5,2,4,-1) hold off axis equal 

correct scaling

with proper axis scaling, normal vector appear normal plane.


Comments