Hello
I have two pints and I need to find the surface passing them and then investigate even a line that passes new points A nad B have an interaction with the surface or not?
I have to add that all my numbers are positive and I do not have a negetive integer so I can not use "fzero" function since the root of the function is where fun(x) changes sign.
I write the below code as far and have problem for the intersection part.
Thanks for any help.
%Creating surface in matlab
x=[-1;5];y=[1;1];[X,Y]=meshgrid(x,y);z=[0 0; 2 2];S=surf(X, Y, z)hold onstem3(x, y, z, '--*m')% A and B cordinates
XN =[ 0.5; -0.7];YN=[-0.5;1.5];ZN=[-1;1.5];hold onscatter3(XN,YN,ZN);A =[XN(1) YN(1) ZN(1)];B =[XN(2) YN(2) ZN(2)];plot3(XN,YN,ZN);% check if the line passinng A and B has an interaction with surface "S" or not?
Best Answer