In this exercise, you will create, if possible, an m by n matrix A, such that, an (i, j)-entry of the matrix A is the sum of the indices i and j, where i runs from 1 to m and j runs from 1 to n. You can use a for loop for constructing matrix A.
You will also check in your code whether the given variables m and n are integer elements. The conditional statement "if...else" and the MATLAB function mod can be used here. If both m and n are integers, proceed to the calculation of the entries of the matrix A. If not, the outputs have to be "A = empty_matrix" followed by the comment "m and n must be integers".
Please follow the steps outlined below:
Create the function in MATLAB:
A = sums(m, n)