Why the syms command is not working on my matlab?

294 views (last 30 days)
when entering the syms command to define variables, an error occurs that says undefined function.

Accepted Answer

Walter Roberson
Walter Roberson on 14 Sep 2013
syms is part of the Symbolic Toolbox. The Symbolic Toolbox is an optional, extra-cost toolbox for the Academic license and the Professional license. The Symbolic Toolbox is included in the Student Version, but it is not installed by default.
  9 Comments
Abdelqader
Abdelqader on 27 Feb 2024 at 18:35
Edited: Walter Roberson on 27 Feb 2024 at 19:23
how i answer this question in mat lab
Solve the following system of simultaneous equations for x:
-2.0 x1 + 5.0 x2 + 2.0 x3 + 3.0 x4 + 4.0 x5 - 1.0 x6 = -3.0
2.0 x1 - 1.0 x2 - 5.0 x3 - 2.0 x4 + 6.0 x5 + 4.0 x6 = 1.0
-1.0 x1 + 6.0 x2 - 4.0 x3 - 5.0 x4 + 3.0 x5 - 1.0 x6 = -6.0
4.0 x1 + 3.0 x2 - 6.0 x3 - 5.0 x4 - 2.0 x5 - 2.0 x6 = 10.0
-3.0 x1 + 6.0 x2 + 4.0 x3 + 2.0 x4 - 5.0 x5 + 4.0 x6 = -6.0
2.0 x1 + 4.0 x2 + 4.0 x3 + 4.0 x4 + 5.0 x5 - 4.0 x6 = -2.0
Walter Roberson
Walter Roberson on 27 Feb 2024 at 19:26
syms x1 x2 x3 x4 x5 x6
eqns = [
-2.0*x1 + 5.0*x2 + 2.0*x3 + 3.0*x4 + 4.0*x5 - 1.0*x6 == -3.0
2.0*x1 - 1.0*x2 - 5.0*x3 - 2.0*x4 + 6.0*x5 + 4.0*x6 == 1.0
-1.0*x1 + 6.0*x2 - 4.0*x3 - 5.0*x4 + 3.0*x5 - 1.0*x6 == -6.0
4.0*x1 + 3.0*x2 - 6.0*x3 - 5.0*x4 - 2.0*x5 - 2.0*x6 == 10.0
-3.0*x1 + 6.0*x2 + 4.0*x3 + 2.0*x4 - 5.0*x5 + 4.0*x6 == -6.0
2.0*x1 + 4.0*x2 + 4.0*x3 + 4.0*x4 + 5.0*x5 - 4.0*x6 == -2.0]
eqns = 
[A,b] = equationsToMatrix(eqns)
A = 
b = 
A\b
ans = 

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!