I have a 2-D array A=zeros(1000,1024). I want to iteratively compute the difference between each of the value of the i-th row (with i=1-999) and the values of 1000th row.
Right now I think of looping over the 1-999 rows, compute the differences of the current row and the 100th row and store it in a seperaate data structure (B=zeros(999,1024)). After, I compute the minimum of each column using another for-loop, which iterates over the columns of B.
Do you know of a more efficient, faster approach?