Student Support Forum: 'Solving a system of 16 unknowns with 16 equations' topicStudent Support Forum > General > "Solving a system of 16 unknowns with 16 equations"

 < Previous Comment Help | Reply To Comment | Reply To Topic
 Author Comment/Response Aaron Honecker 09/12/00 2:55pm >I have to solve for 16 unknowns with 16 equations, which should be easy to do. In fact, I did it easily by hand and on matlab, but I have to do it on Mathematica for a class and I'm having trouble doing it. Here's what I tried:>--First, I tried using the Solve command to solve for all 16 unknowns at the same time. But it gave me the null vector as the solution. >--Then, I tried to solve for a few unknowns at a time. I solved three equations for three unknowns: F2,x1, and x2. It worked for the first set of unknowns. But when I had to call those unknowns in the following equations, Mathematica told me that the variable did not exist. > >How can I call a particular variable from a solution vector to use in a following equation? If the solutions vector says, {F2-->20, x1-->2, x2-->3}, then why can I not type in F2 in the next equation as a defined variable? > >It would be much simpler if it was possible for me to just use Solve to find all 16 unknowns at the same time. Is that possible? Without knowning the exact problem you are trying to solve and exactly how you attempted to solve the problem in Mathematica, it is not possible to give you an exact answer. If you would post your exact problem along with the steps you used in Mathematica to solve it, someone in this forum should be able to give you some help. I setup a completely random 16 by 16 systems and solved it using two different methods. A = Array[Random[]&, {16,16}]; x = Array[X, {16}]; b = Array[Random[]&, {16}]; Solve[Thread[A.x==b], x] produces a result in the form {{X[1]-> -2.097, ... , X[16]->0.267135}} LinearSolve[A, b] produces a result in the form {-2.097, ... , 0.267135} URL: ,

 Subject (listing for 'Solving a system of 16 unknowns with 16 equations') Author Date Posted Solving a system of 16 unknowns with 16 equations Revathi 09/11/00 5:53pm Re: Solving a system of 16 unknowns with 16 equ... Aaron Honecker 09/12/00 2:55pm
 < Previous Comment Help | Reply To Comment | Reply To Topic