MATLAB: Intersection of plane and line.

intersectionMATLABmatrixplanevector

what is the code to find the intersection of the plane x + 2y + 3z = 4 and line (x, y, z) = (2,4,6) + t(1,1,1)?

Best Answer

One approach:
syms x y z t
% x + 2y + 3z = 4 and line (x, y, z) = (2,4,6) + t(1,1,1)
xl = 2 + t;
yl = 4 + t;
zl = 6 + t;
Eqn = x + 2*y + 3*z == 4;
Eqn = subs(Eqn, {x y z},{xl yl zl});
t = solve(Eqn, t)
Then, substitute back into the ‘line’ equations for ‘xl’, ‘yl’, and ‘zl’.
Related Question