Solve linear system by trial and error

9 Ansichten (letzte 30 Tage)
carl hooper
carl hooper am 9 Sep. 2018
Kommentiert: madhan ravi am 9 Sep. 2018
I need to solve an equation like x=a+b; putting a condition such that x>b. How can i do that in matlab ?

Akzeptierte Antwort

madhan ravi
madhan ravi am 9 Sep. 2018
Bearbeitet: madhan ravi am 9 Sep. 2018
Try this:
syms x a b
assume(x>b)
eqn=x==a+b
sol=solve(eqn,x,'ReturnConditions',true)
sol.x
  4 Kommentare
madhan ravi
madhan ravi am 9 Sep. 2018
Bearbeitet: madhan ravi am 9 Sep. 2018
This will display the solution if and only if x greater than any member of b.
madhan ravi
madhan ravi am 9 Sep. 2018
@carl did it satisfy?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by