Why are taking abs() of something that you just tested and found to be greater than 0?
You can replace your current if logic with
const1(aa) = max(pop(it,np).arthvar.PA(m,aa,bb)-PN(aa), 0);
... but where are you taking the sum? It is the double sum that needs to be < 

for aa = 1 : AA
const1(aa) = max(0, sum(pop(it,np).arthvar.PA(:,aa,:), 'all') - PN(aa));
end
That can be vectorized even further to avoid the loop.
