Question: I need the functions for A and B, I cannot figure them out In this exercise, you will create, when possible, an m by n


I need the functions for A and B, I cannot figure them out
In this exercise, you will create, when possible, an m by n matrix A, such that, an (i, j)-entry of the matrix A, A(ij), is the sum of the indexes i and j, where i runs from 1 to m and j runs from 1 to n. For example: A(1,1) 1+, A1,2 1+2, A(2,1) 2+1, and so on. You can use for loop to construct the matrix A, given positive integers m and n. To decide whether A can be created, you will verify in your code if the given variables m and n are positive integer numbers. You can use the conditional statement "if... else" (see for help http://www.mathworks.com/help/matlab/refif.html) and a MATLAB in-built function such as mod, floor, fix. If both m and n are positive integer, proceed to calculating entries of the matrix A. If not, the outputs have to be A = [ ] (A is an empty matrix) and the message: Error in using sums: both m and n must be positive integer. Please follow the steps outlined below: **Create the function in MATLAB **Type the function in your diary file by using command **Run the function on the following sets of variables. A-sums (m,n) type sums A-sums (m,n)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
