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

Help with For Loops with Matrices

  • June 12, 2013
  • 1 reply
  • 2547 views

Hi,

I am relatively new to programming and to Mathcad as well. I am using Mathcad Prime 2.0. I currently have a 15x3 matrix and a 1x3 matrix. I am trying to create a for loop that will call out each column of the 15x3 matrix and then subtract off the 1x3 matrix from the column and then output all 15 answers back into matrix form. I am a first time user with the discussion board so I apologize if I am not clear with what I want. I will attach the worksheet that I am currently working with. Any and all help or suggestions is greatly appreciated.

Best answer by Werner_E

Change the vector index at vec to a row selector and your routine works. The dummy parameter vec is not necessary.

See attached

1 reply

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

Change the vector index at vec to a row selector and your routine works. The dummy parameter vec is not necessary.

See attached

sah24731-VisitorAuthor
1-Visitor
June 13, 2013

Thanks for the quick help.