cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Help with For Loops with Matrices

sah2473
1-Visitor

Help with For Loops with Matrices

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.

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:sah2473)

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

See attached

View solution in original post

2 REPLIES 2
Werner_E
25-Diamond I
(To:sah2473)

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

See attached

Thanks for the quick help.

Announcements

Top Tags