Q:

Generate a 2 x 4 matrix variable mat. Verify that the number of elements is the product of the number of rows and columns

0

Generate a 2 x 4 matrix variable mat. Verify that the number of elements is the product of the number of rows and columns.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

>> mat = randi(20,2,4)

mat =

 1 19 17 9

 13 15 20 16

>> [r c] = size(mat);

>> numel(mat) == r * c

ans =

 1

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now