Skip to main content
1-Visitor
June 22, 2019
Solved

Solver block for multiple pairs of input values

  • June 22, 2019
  • 1 reply
  • 4103 views

Hi everyone. I'm very new to MathCAD, using Prime 4.0. I was able to figure out solving 2 simultaneous equations using Solve blocks, and now I'd like to take that one step further so I could solve for multiple pairs of input values. That is, I already have a solve block that finds correct values w/ guess values x1 & y1, and would like one that will solve for x1 & y1, x2 & y2, x3 & y3... I'm guessing this would require some sort of matrix magic, but I'm not really sure. Obviously, I could just copy & paste the solve block for each new pair of inputs, but I have to believe there's a more elegant solution. Can anyone provide some advice?

Best answer by Fred_Kohlhepp

See if this works.

1 reply

25-Diamond I
June 22, 2019

With input values you obviously mean the guess values, right?

You can turn the solve block into a function with the guess values as arguments.

Just attach your worksheet with the example solve block which you expect to return different results for different guess values.

25-Diamond I
June 22, 2019

Here is an example of what I was talking about:

B.png

Worksheet in format P4 attached

1-Visitor
June 23, 2019

This looks like a very clear example!  I'll try to implement it in my sheet, and share the results.  Thanks Werner_E!