How to get all of the roots of a syatem of second order equation ?

조회 수: 1 (최근 30일)
farzad
farzad 2019년 11월 14일
답변: Walter Roberson 2019년 11월 14일
Hi all
I'm solving a set of second order equations that can have more than one root(answer) that can satisfy a certain condition. The problem is that most of the time it stops at the first solution it finds that's true that it could satisfy the one condition I define externaly out of fsolve. For example if My answer is a set of coordinates of a point, I don't want that point have more than a certain distance from a certain point otherwise fsolve should continue. How do I do this?

채택된 답변

Walter Roberson
Walter Roberson 2019년 11월 14일
It is not possible to use constraints with fsolve()
What you can do is fmincon() on the square of your function; when you are looking for a zero, then provided the function is real valued, the square of the function will have a minimum at the zero. fmincon() can have linear and nonlinear constraints.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by