Question: Write a matlab code that generates a matrix of positive integer less than or equal the positive integer x. the matrix size is (n x
Write a matlab code that generates a matrix of positive integer less than or equal the positive integer x. the matrix size is (n x m). Then use loop (for or while) and if statement to count how many times the positive integer y exists in the matrix. The code shall be general, so it can work for any matrix size and for any y and x.

And this is what I have so far:

The matrix seems fine but the counter is off.

Write a matlab code that generates a matrix of positive integer less than or equal the positive integer x. the matrix size is (n x m). Then use loop (for or while) and if statement to count how many times the positive integer y (y S x) exists in the matrix. The code shall be general, so it can work for any matrix' size and for any y and x. . Save your code as a script file named HW32
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
