Hello All,
I would really appreciate any help on this question.
1. Generate a 200 x 200 matrix a random integers between -100 and 100.2. Use the built-in command sum to determine the total sum of all the numbers in this matrix.3. Put the command “tic” and “toc” right before the sum and after4. Use nested loops to calculate the sum by adding one number at a time. 6. Display the two results to make sure they are equal.
This is what I have so far. I don't understand how to do the loop to calculate the sum.
tic;x = randi([-100, 100], 200, 200)toc;
Best Answer