subarray functions - submatrix and subvector
- October 5, 2015
- 1 reply
- 5159 views
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




