Sorting a matrix by columns and applying the same position-changes to another matrix
Hello,
I have a "problem" going beyond what has been answered here by Viktor Korobov: http://communities.ptc.com/message/156059#156059
I have three subarrays (size m by n) containing coordinates (x,y and z) of a whole bunch of points...I need each of these points to be sorted within their columns. In each column I want the point (x,y,z) with the largest y-coordinate in the top-postions of each collumn and subarray and the one with the smallest y-coordinate in the last spot of the columns.
I can sort an individual subarray the way Viktor Korobov has written, but of course I need to drag my x and z-coordinates along as well to maintain the integrity of my data. Does anybody have an idea how I can manage for the x- and z-coordinates to be rearranged according to the order achieved by the sort-command?
Here the structure of my data:
Array=({mxn},{mxn},{mxn})T
Array[0 contains x-coordinates
Array[1 contains y-coordinates
Array[2 contains z-coordinates
i:=0...cols(Array[-1) gives me the index for the sorting process
name<i>:=invert(sort(Array[0<j>)) sorts the collumns of my array
I'm using Mathcad 14 (Mathcad Prime is not an option right now) with the German language-package.
(I'm sorry, but I can't upload my mathcad-file)
edit: just the title...and the "invert"

