function z = iqrmiss(xx)

%Function Z = IQRMISS(X)
%  Returns as a row vector the medians of the columns of X where
%  missing values are coded as NaN. Performs the same function
%  that MEDIAN provides for matrices w/o missing data. 

[m,n] = size(xx); z = zeros(1,n);
for k = 1:n
   z(k) = iqr(xx(find(isfinite(xx(:,k))==1),k));
end
