Find the intersection between two curves

조회 수: 1 (최근 30일)
andrea
andrea 2020년 10월 28일
답변: Alan Stevens 2020년 10월 28일
So I would like to write a simple program in for a school project, that can find the intersection between two curves, for example between y1 = x^2 and y2 =x ( but also with more general curves). A very simple approach i thought was to simply make the difference between the two vector like: y1-y2 and than find the element that are zero. Is that the right way to do it or maybe is to naive? Have you got some suggestion for a more mathematically rigorous approach ?
p.s I would like to do it by myself but also if you know some usefull toolbox or function that can do this to double-check I will be gratefull.
Tahnk you.

답변 (1개)

Alan Stevens
Alan Stevens 2020년 10월 28일
Look at the fzero function (doc fzero). Express y1-y2 as a function and use fzero.

카테고리

Help CenterFile Exchange에서 Genetic Algorithm에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by