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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

MATRIX CONFUSION (Beginner to matrices)

JE_5076959
3-Visitor

MATRIX CONFUSION (Beginner to matrices)

Hello all. I am not new to Mathcad but am new to matrices and evaluations. What i am trying to figure out is how to tell Mathcad Prime 9.0 to automatically select incrementing rows from a previous matrix for use in an formula. Please see the attached screenshot from a manual. I can define the E matrix without issue, but am lost after that. I have tried setting n = 0 and ORIGIN = 0, but that doesnt do what I need. 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

A bit easier

Werner_E_1-1700309983262.png

 

I am way out of my comfort zone, but as I understand it the  values in vector A.c should add up to H, which is not the case with the formulas given.

IMHO a sign in NCMA EQ 7-57 is wrong and it should rather be

Werner_E_1-1700316087762.png

In the picture posted by @JE_5076959  the "n"'s are wrong and should be "N"'s, as n is used as a variable index ( @terryhendicott  used "i" instead in his sheet).
This is correct given in the NCMA manual

https://ncma.org/wp-content/uploads/2022/05/NCMA-SRW-Manual-FINAL.pdf

but the sign in that manual still is wrong, I think.

Just noticed that the simplification I have given above is also in that manual as EQ 7-56 😉

 

EDIT: @JE_5076959 
IMO you should mark the answer of @terryhendicott  as the correct one, not mine - after all it was his answer which provided the worksheet which possibly had answered your question about the handling of the matrices.

 

View solution in original post

7 REPLIES 7

Please attach your worksheet so we can see where you fail

Here is one way.  Equations don't look right?

 

A bit easier

Werner_E_1-1700309983262.png

 

I am way out of my comfort zone, but as I understand it the  values in vector A.c should add up to H, which is not the case with the formulas given.

IMHO a sign in NCMA EQ 7-57 is wrong and it should rather be

Werner_E_1-1700316087762.png

In the picture posted by @JE_5076959  the "n"'s are wrong and should be "N"'s, as n is used as a variable index ( @terryhendicott  used "i" instead in his sheet).
This is correct given in the NCMA manual

https://ncma.org/wp-content/uploads/2022/05/NCMA-SRW-Manual-FINAL.pdf

but the sign in that manual still is wrong, I think.

Just noticed that the simplification I have given above is also in that manual as EQ 7-56 😉

 

EDIT: @JE_5076959 
IMO you should mark the answer of @terryhendicott  as the correct one, not mine - after all it was his answer which provided the worksheet which possibly had answered your question about the handling of the matrices.

 

Thank you and @terryhendicott for the help. I believe I was getting lost in the definition of n and adding i. 

 

Hey Terry, I was trying to use those formulas in my worksheet and my D vector begins populating for 22 rows. Even when I copy your formulas directly into my worksheet it still does the same thing. A screenshot is below and my worksheet is attached. Screenshot 2023-11-20 104155 MathCAD.png

Near the top of the sheet you assigned N the value 22

Werner_E_0-1700502714859.png

and N is not ever changed in the sheet,

So this

Werner_E_1-1700502748652.png

creates a vector with 22 elements with elements 1 to 21 set to zero.

The next command sets values to the first seven elements of the vector.

Probably you should have redefined N to be the number of rows in Ac or you use something like this

Werner_E_2-1700502954047.png

last(Ac) returns the number of the last element in Ac and because this command is independent from the setting of the system variable ORIGIN I would prefer it over rows(Ac) (which would also work in your sheet because you had set ORIGIN to 1).

 

Thank you for the quick response. I knew it had to be something like that which I wasnt picking up on. I redefined "N" in Terrys forumlas as "Ngrid" so I am assuming that if i change Dn to DNgrid that should solve the issue just the same, but I will definitely try it both ways. I am grateful for a community that has experience with this as one of my colleagues was looking at it and we were looking at each other completely confused. Most of our Mathcad stuff is simple equations but we are trying to figure out how to make use of its complex calculation abilities for future projects. 

Top Tags