How to write correct matlab codes in solving equation?

8 views (last 30 days)
I tried to used "solve" to solve the equation but got error. Here is what I have tried.
syms x solve(x+2=1,x)
Please help me correct the codes. I would like to work on harder equations and loops commands. Thanks in advance,

Accepted Answer

Mischa Kim
Mischa Kim on 17 Jun 2015
Edited: Mischa Kim on 17 Jun 2015
Anupan, use
syms x
solve(x+2 == 1,x)

More Answers (0)

Categories

Find more on Symbolic Math Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!