How can I use matlab to find the solution of an equation when equal to zero using variables without substituting with numbers?

91 views (last 30 days)
I want to find how can I use matlab to find the solution of an equation when equal to zero using variables without substituting with numbers?
for example if the equation is : (x^2) - (y^2) = 0
the answer will be (x=y)

Accepted Answer

Roger Stafford
Roger Stafford on 25 Apr 2015
That is what the 'solve' function of the Symbolic Toolbox endeavors to do. It is not always successful, but it capable of some remarkable results.
  3 Comments
Ahmed Fahmy
Ahmed Fahmy on 25 Apr 2015
Edited: Ahmed Fahmy on 25 Apr 2015
Actually it worked with one variable only:
syms a b c x y sol = solve(x^2 - y^2== 0)
sol =
y
-y
but how can i use it with 2 variables ?

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!