Skip to main content
1-Visitor
June 13, 2013
Solved

Help Writing a Complex For Loop

  • June 13, 2013
  • 1 reply
  • 2452 views

I am trying to write a for loop that will take values from two different matrices and create one 2x1 matrix and one 2x2 matrix. The purporse of the 2x1 and the 2x2 is to take the inverse of the 2x2 times the 2x1 to solve for 2 unkown variables. The matrices that are being pulled from are 15x3 originally. I am assuming one of my 3 unknowns to be equal to 1 and therefore enabling me to solve two equations for two unknowns simultaneously. I am using mathcad prime 2.0 to do this. I will attach a worksheet showing what I am trying to do. At the bottom of the worksheet is an italicized section named "Solve for Un-Normalized Force Vector". I have it done for one set of values but dont want to have to go through and redo it 14 more times to get my results. I am new to programming loops and such so I am trying to teach myself as much as possible.

Any help and suggestions are much appreciated.

Best answer by Werner_E

Think the attached should do what you intended.

1 reply

Werner_E25-Diamond IAnswer
25-Diamond I
June 13, 2013

Think the attached should do what you intended.

25-Diamond I
June 13, 2013

Some additional ideas added