Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
As an extension to Valery's Mathcad Prime Minister (Submatrix and Subvector), I'd like to propose the following extensions to Mathcad's subarray functions (unfortunately, I can't post worksheets to Valery's PM thread, otherwise I'd have posted this there).:
The new submatrix function interprets negative indices as counting from the end of an array (ie, -1 == last row or column index). The functions subvector (which has been in my library for a long time) is simply a specialized form of the new submatrix (a variant of which I've also used for a long time). I've also included the functions firstrows, lastrows, firstcols, lastcols, rowends, colends and matends. The first 4 are hopefully suggestively named. The latter 3 are intended to provide a compact view of the first and last few elements of an array (I often find it convenient to look at the first and last values of an array calculation).
Stuart
StuartBruff wrote:
As an extension to Valery's Mathcad Prime Minister (Submatrix and Subvector), I'd like to propose the following extensions to Mathcad's subarray functions (unfortunately, I can't post worksheets to Valery's PM thread, otherwise I'd have posted this there).:
The new submatrix function interprets negative indices as counting from the end of an array (ie, -1 == last row or column index). The functions subvector (which has been in my library for a long time) is simply a specialized form of the new submatrix (a variant of which I've also used for a long time). I've also included the functions firstrows, lastrows, firstcols, lastcols, rowends, colends and matends. The first 4 are hopefully suggestively named. The latter 3 are intended to provide a compact view of the first and last few elements of an array (I often find it convenient to look at the first and last values of an array calculation).
Prime 3.1 and pdf attached.