Generate a 2 x 4 matrix variable mat. Verify that the number of elements is the product of the number of rows and columns
belongs to book: MATLAB: A Practical Introduction to Programming and Problem Solving|Stormy Attaway|Fourth Edition| Chapter number:2| Question number:14.2
All Answers
total answers (1)
>> 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