I am having a bit of a problem adding a line to my plot3 of a plane. This is my code for plotting just the plane
X = Final(1,:,:);
Y = Final(2,:,:);
Z = Final(3,:,:);
plot3(X,Y,Z,'o','color','b');
and it gives me this plot, which is what I want : But then I wanted to add position vector to it - and as I understood it then its just a line from point b to projection of b onto the new plane (which is what is in the plot above).
So I just chose one of the original points as the p1 and p2 as the projection of it and then wanted to plot a line between them and add to the plot above. There I am having the trouble.
p1 = [200; -107; 0]
p2 = [201 ; -105; 3]
X = Final(1,:,:);
Y = Final(2,:,:);
Z = Final(3,:,:);
hold on
plot(p1,p2)
plot3(X,Y,Z,'o','color','b');
grid;
hold off
This is the result, but I was hoping for something like this: