필터 지우기
필터 지우기

How can I get all possible solutions for an equation?

조회 수: 6 (최근 30일)
payman khayree
payman khayree 2014년 8월 26일
댓글: payman khayree 2014년 9월 3일
I need to get all possible solutions for this equation:
sin(x)/x == a
for "0.2 < a < 1", it has 3 to 5 solutions but matlab functions such as "solve" and "vpasolve" only return the first solution they find. How can I get all the answers? should I use another function?
thank you all payman

채택된 답변

Greg Heath
Greg Heath 2014년 8월 27일
Some or all of the solutions can probably be obtained via recursion.
Given a, b=1/a and x(1), try
x(n+1) = arcsin(a*x(n))
and
x(n+1) = b*sin(x(n))
Simultaneously plotting y1= a*x and y2 = sin(x) for 0.2 <= a <= 1 will yield insight.
Hope this helps.
Thank you for formally accepting my answer
Greg
  댓글 수: 1
payman khayree
payman khayree 2014년 9월 3일
not what I was looking for, but anyways thanks for your answers

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

John D'Errico
John D'Errico 2014년 8월 26일
All possible solutions is in general an impossible thing for a completely general function, since there may be infinitely many such solutions.
If you know there are a finite number of solutions, and can bound them, then just sample your function on a fine enough interval, and use fzero over brackets generated by the sampling. WTP?

카테고리

Help CenterFile Exchange에서 Matrix Computations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by