powered by
Function tests is any matrix element is above a maximum value. For those elements the function sets those values to the maximum value.
test_for_max(mat, max_mat)
A matrix.
A matrix the same size as mat with the maximum allowed value of that element.
A matrix
Other matrix_manipulation: diag_matlab, test_for_min, test_for_zeros
diag_matlab
test_for_min
test_for_zeros
# NOT RUN { test_for_max(cbind(2,3,4,5,6),cbind(4,4,4,4,4)) test_for_max(ones(6)*45,ones(6)*40) # }
Run the code above in your browser using DataLab