In MATLAB, I'd do something like Xm = X - repmat(max(X,2), 1, size(X,2)) For Python, I've been toying with variations of Xm = X - np.matlib.repmat(np.max(X,axis = 1), 1, len(X)) but to no avail! ALL RIGHTS RESERVED. Here the number of rows is five and the numbers of columns are 2. Repeat copies of a matrix into a 2-by-3-by-2 block arrangement. The matters goes counter-intuitive when you ask for repetition/tiling over more dimensions than the input matrix has. A function to match repmat in Matlab (Mathworks, Natick, MA) Arguments a.
0 Comments
Leave a Reply. |