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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

subarray functions - submatrix and subvector

StuartBruff
23-Emerald III

subarray functions - submatrix and subvector

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

1 REPLY 1
StuartBruff
23-Emerald III
(To:StuartBruff)

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.

Announcements

Top Tags