Size a repeated command-code array

A controller test uses a repeating block of dimensionless command codes. The engineer creates the block and a larger array with these MATLAB commands, where r and c are positive integers:


MATLAB
P = [2 8 2; 5 0 5];
B = repmat(P,r,c);


Array B must contain exactly 180 entries arranged in 15 columns. Determine the required values of r and c, and the total number of entries equal to 5 in B. Enter all three answers as exact integers.

Your answers

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Creating Arrays Questions: