Why do I get an error when I try to use the solve function?
Show older comments
When I type the following command in matlab >> [x,y] = solve('x+2*y=4','2*x - y=3'),
I get the following error
Check for incorrect argument data type or missing argument in call to function 'solve'.
I was hoping someone could help me fix this. Thanks.
Accepted Answer
More Answers (1)
solve() requires the inputs to be Symbolic Math objects
syms x y
[x,y] = solve(x + 2*y == 4, 2*x - y == 3) % note the use of == as required to define an equation
Categories
Find more on Dynamic System Models 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!