Skip to main content
1-Visitor
August 16, 2017
Solved

Solving various systems of equations

  • August 16, 2017
  • 1 reply
  • 2041 views

Dear all,

 

I have to solve a nonlinear system of equations.

 

y1 = a11*x1 + a12*x2 + x1*x2... 

y2 = a21*x1 + a21*x2 + x1*y1...  And so on...

 

So far, so good, solving the system is a piece of cake with Mathcad. But the thing is I want to solve the system for different values of, for instance, a11. I want to solve the system for a11 = 0,1 then store the result in a matrix, then for a11=0,2, store it, then solve it for 0,3 ... Here is where the problem starts since I'm having a bad time trying to use solve block inside a "for" loop (each iteration modifies the value of a11). Is this possible ? Are there any examples out there ? Any other options ? Thanks in advance.

Best answer by Werner_E

As you found out, you can't use the "find" of a solve block in a program, but you can turn a normal solve block into function dependent on, lets say a11 in your example and call that function in a program loop.

 

1 reply

Werner_E25-Diamond IAnswer
25-Diamond I
August 16, 2017

As you found out, you can't use the "find" of a solve block in a program, but you can turn a normal solve block into function dependent on, lets say a11 in your example and call that function in a program loop.

 

ricasc1-VisitorAuthor
1-Visitor
August 17, 2017

Is there any example of that ?

ricasc1-VisitorAuthor
1-Visitor
August 17, 2017

I have figured it out now.