Azzera filtri
Azzera filtri

Hi, i try to solve equation c in terms of other variables, and its appear the messages and the answers is not as expected. Is supposed to be beta/p^(1/sigma)? is it?

3 visualizzazioni (ultimi 30 giorni)

Risposte (1)

Torsten
Torsten il 5 Giu 2024
Modificato: Torsten il 5 Giu 2024
Maybe you want to restrict the parameters to be positive (and thus real-valued):
syms beta c sigma p positive
eqn1 = beta/c^sigma - p == 0
eqn1 = 
sc1 = solve(eqn1,c)
sc1 = 
eqn2 = (beta/c)^sigma - p == 0
eqn2 = 
sc2 = solve(eqn2,c)
sc2 = 
  2 Commenti
Torsten
Torsten il 6 Giu 2024
Modificato: Torsten il 6 Giu 2024
I can't tell you in this special case.
The "problem" is that the equation
z^n = 1
does not only have real, but also complex solutions.
E.g.
syms z
eqn = z^6 == 1;
solve(eqn)
ans = 
That's what the solver tries to tells you. So if you only want the real solutions, you must somehow exclude them in advance (which I tried by the positivity assumption) or sort them out from the obtained solution afterwards (e.g. by setting l = 0 in the expression you did obtain).

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by