Given the equation of a plane as z = a*x + b*y + c, planefit, executed as C = planefit(x,y,z), solves for the coeficients C = [a b c]. Planefit does nothing fancy, it simply sets up and lets MATLAB solve the least-squares problem to solve for the coefficients - a handy utility function.
Val Schmidt (2021). planefit (https://www.mathworks.com/matlabcentral/fileexchange/36353-planefit), MATLAB Central File Exchange. Retrieved .
I guess it never occurred to me.
Hello. I congrats you. I Have a question. Why do you set the plane equation as z=Ax+By+C? This way you are not allowing any plane parallel to z axis.
LMS, Create any two vectors that lie within the plane and calculate their cross-product. That would give you a vector orthogonal to both.
Very useful! What's the easiest way to calculate the plane normal, please?
Rose Ann, I'm afraid I don't understand your question.
Is the multiplier on Z 1 or 0?
It is possible that I don't fully understand what you are attempting to do, but it seems to me you must have 3 points to define any plane and having just two will not be sufficient to find a third.
I am having issues using this code. Please help me out...
What I am trying to do:
1)use existing points to define a plane
2)using the plane solve for the location of new points knowing 2 out of 3 of the coordinates and solving for the third using the equation from planefit....
But I cant get planefit to work
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!