The solve function in matlab isn't working.
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Mariam Atef
am 17 Apr. 2020
Kommentiert: Mariam Atef
am 17 Apr. 2020
I've inserted the following codes:
clear,clc
syms x y
A=solve('x+y=1','x-y=0');
just with the same shown order, however, when i run it gives me nothing except some errors.
How can I solve the problem?
PS: the errors:
Error using solve>getEqns (line 418)
List of equations must not be empty.
Error in solve (line 226)
[eqns,vars,options] = getEqns(varargin{:});
Error in code2 (line 3)
A=solve('x+y=1','x-y=0');
0 Kommentare
Akzeptierte Antwort
Steven Lord
am 17 Apr. 2020
Rather than specifying the inputs to solve as char vectors, you should specify them as symbolic equations.
syms x y
A = solve(x+y == 1, x-y == 0)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!