A = zeros(5,100); for m = 1:5 for n = 1:100 A(m, n) = 1/(m + n - 1); end end
For this code, what is the purpose for defining the vector A 5 by 100 matrix. When m reaches 5, does the first loop stop? So do we continue to enter m=5 in the calculation while increasing with n up until 100? What does A(m,n) mean? why not B = 1/(m+n-1)
A = zeros(5,100); for m = 1:5 for n = 1:100 A(m, n) = 1/(m + n - 1); end end
For this code, what is the purpose for defining the vector A 5 by 100 matrix. When m reaches 5, does the first loop stop? So do we continue to enter m=5 in the calculation while increasing with n up until 100? What does A(m,n) mean? why not B = 1/(m+n-1)