How can I get all possible solutions for an equation?
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (1)
John D'Errico
el 26 de Ag. de 2014
0 votos
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?
Categorías
Más información sobre Optimization en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!