Matlab: Find minimum value from a set of values for each column in an array -


i have 2-d array a=zeros(1000,1024). want iteratively compute difference between each of value of i-th row (with i=1-999) , values of 1000th row.

right think of looping on 1-999 rows, compute differences of current row , 100th row , store in seperaate data structure (b=zeros(999,1024)). after, compute minimum of each column using for-loop, iterates on columns of b.

do know of more efficient, faster approach?

if want minimum of each column, can save many operations doing subtraction @ end:

min(a(1:end-1,:),[],1) - a(end,:) 

Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -