To find the points of intersection between two curves in MATLAB, you need to follow these steps:
polyxpoly
function to find the points of intersection between the two curves.Here's an example code snippet that demonstrates how to do this:
main.m316 chars17 lines
In this example, we define two curves (a parabola and a sine wave), find their intersection points using polyxpoly
, and then store the points in an array p1
of size n
-by-2. Each row of the array corresponds to one intersection point, with the x and y values stored in the first and second columns, respectively.
gistlibby LogSnag