I want to solve x, and it shows the warning messege "Unable to solve symbolically". It tells me to use vpasolve, but I don't want the "0" answer. Below is my code.
>syms x real;
>sol = solve(sin(x)==0.703*x,x);
What should I do to solve x?
Thanks

 Réponse acceptée

Torsten
Torsten le 29 Oct 2018

1 vote

x0 = [1 2];
fun = @(x)sin(x)-0.703*x;
sol = fzero(fun,x0)

2 commentaires

Roger Jiang
Roger Jiang le 29 Oct 2018
Thanks for your answer. However, I don't know what are the meaning of "@(x)" and "fzero". Would you like to explain? Thanks alot
help functionhandle
help fzero

Connectez-vous pour commenter.

Plus de réponses (1)

Walter Roberson
Walter Roberson le 29 Oct 2018

1 vote

Use vpasolve with a third parameter that gives a starting point or search range.

Catégories

En savoir plus sur Symbolic Math Toolbox dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by