MATLAB: How to find the intersection point of two vector arrays

intersection

if true
v1=[ 0 4.4847 8.9694 13.4541 18.3872 22.8719 26.2803 30.0474 33.7248 39.1962 45.2056 50.3182 54.8029 58.9288 64.2207 67.8981 71.5756 75.3427 76.2397 80.7243 85.2090];
v2=[ 0 7.9977 15.9954 23.9931 32.7905 40.7882 46.8665 53.5845 60.1426 69.8998 80.6167 89.7341 97.7318 105.0896 114.5269 121.0850 127.6431 134.3612 135.9607 143.9584 151.9561];
P=[0 15.0749 36.1817 57.8917 85.3013 133.7687 200.3439 279.9894 347.5677 411.8628 466.7912 502.3464 517.2896 525.3360 527.1648 510.7629 472.0163 310.0224 256.2738 0 0];
plot(v1,P,v2,P)
end

Best Answer

>> f{1} = griddedInterpolant(v1,P);
f{2} = griddedInterpolant(v2,P);
fzero(@(x)f{1}(x)-f{2}(x),[eps v1(end)])
ans =
72.6470
>>