function positiv = erpositiv(tabell) [m n] = size(tabell); positiv = true; for i = 1:m for j = 1:n if (tabell(i,j) < 0) positiv = false; return end end end end