% EX 3: 
%  fonction ProfSPD
% ------------------
function p = ProfSPD(A)
N = size(A,1);
p=zeros(N,1);
for I = 1:N
   if find(A(:,I),1) < N+1 
         p(I) = find(A(:,I),1);
   else
         p(I) = N+1;
   end
%    p(I) = min(find(A(:,I)));
end