empty sym: 0-by-1.
192 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
omid ghorbani
il 9 Giu 2019
Commentato: Sonja Glas
il 16 Ott 2019
i want to solve a equation in a algorithm. this equation is ('x-sin(x)=b') .in this equation 'b' calculated of previous step. for example b=0.45.
when i run this, the answer is empty sym: 0-by-1.
but when I run (x-sin(x)=0.45) the answer is correct, means that this equation has numeric answer.
please help me to run this algorithm.
b=0.45
solve('x-sin(x)=b')
ans=
empty sym: 0-by-1
solve('x-sin(x)=0.45')
ans=1.4416
0 Commenti
Risposta accettata
Steven Lord
il 9 Giu 2019
Don't pass a char vector into solve. Build a symbolic equation and pass that into solve.
syms x
b = 0.45;
eq = x-sin(x) == b
sol = solve(eq)
3 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Assumptions in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!