Questions about vpasolve about finding multiple solutions for nonpolynomial equation
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Xiao Lai
il 28 Set 2018
Risposto: Walter Roberson
il 28 Set 2018
The following example show that the "vapsolve" can find multiple solutions for nonpolynomial equation.
syms x
f = x-tan(x);
for n = 1:3
vpasolve(f,x,'random',true)
end
But I want to limit the range of variables, so I changed previous codes like this:
syms x
f = x-tan(x);
for n = 1:3
vpasolve(f,x,[0 100],'random',true)
end
The results always produce the same results. How to solve this problem?
0 Commenti
Risposta accettata
Walter Roberson
il 28 Set 2018
_ = vpasolve(_,'Random',Random) uses a random starting point for finding solutions when 'Random' is set to true. Use this input to avoid returning the same solution repeatedly for nonpolynomial equations. If you specify starting points for all variables, setting 'Random' to true has no effect.
I tested with
assume(x>=0&x<=100)
with that in effect, some negative x values were found and some x values greater than 100 were found, but the range was much less than if the assume was not in effect.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!