Write MATLAB code. For input matrix A, write a function to return (1) the index of the row with the most zero elements, (2) the number of zeros in that row. Example: If input A = [ XXXXXXXXXX...


Write MATLAB code.


For input matrix A, write a function to return


(1) the index of the row with the most zero elements,


(2) the number of zeros in that row.


Example:


If input A =


[1 0 -2 -3 6


0 -3 -5 -2 4


2 0 0 -1 1


-1 5 2 -1 -3],


then y = [3,2].


That is, row 3 has the most zero elements and the number of zeros in that row is 2.


Note:  If you have more than one row with the most zero elements, return the row index of the first row.




Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here