This code checks to see if the diagonal elements of a given matrix A (assuming n x n) are larger in magnitude than the sum of the magnitude of the non-diagonal elements in its row.
Line by line explanation:
The first line loops through all the rows of A.
The second line is defining j = [1 2 3 ... n], so a vector containing 1..n,
The third line is removing the diagonal element, aka, the ith row and this removes the ith column, so the i,i th element,
The fourth line takes the absolute value of all the elements in the ith row of A, excluding the diagonal element: A(i,j) = A(ith row, elements 1,2,...,i-1,i+1,...,n) since we removed the ith element from j previously.
The fifth line computes the absolute value of the diagonal element minus the sum of the absolute value of all the other elements in the row. If Check is positive, we know the magnitude of the diagonal element was greater than the sum of all the magnitudes of the other elements in its row.
Check(i) = abs(A(i,i)) - sum(B);
The sixth line checks if it's less than zero, in which case the diagonal elements magnitude is not greater than or equal to the sum of the magnitudes of the other elements.
If this is the case, the matrix is not strictly diagonally dominant, which the seventh line prints.
fprintf('The matrix is not strictly diagonally dominant at row %2i\n\n',i)
The eighth and ninth lines end the cycle.
Sorry if this was too much detail,
Hope this helps!