I am currently trying to find the intersection between the lines.
Are there any possible techniques in MATLAB to determine these points, since the x and y coordinates are not a function of f?
You could use Bentley–Ottmann algorithm Sweepline algorithm of time complexity O((N + K) log N). But as far as I know, it is not built-in in Matlab.
However, there is a decent Pseudo-Code for it Here.
polyxpoly? I've not used it before but the examples looks like what you're trying to do - Steve