Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
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.
Solved! Go to Solution.
A bit easier
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
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.
Please attach your worksheet so we can see where you fail
A bit easier
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
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.
Near the top of the sheet you assigned N the value 22
and N is not ever changed in the sheet,
So this
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
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.