table

Methods

Method Reference: table.repmat

table: tblB = repmat (tblA, sz)
table: tblB = repmat (tblA, rows, columns)

Repeat copies of a table.

Repeats copies of the input table tblA in a similar fashion to how repmat applies to a matrix. Only two dimensions are supported for tables.

Source Code: table

Example: 1

repmat tiles a whole table, repeating the full block of rows. Contrast with repelem, which repeats each row in place: repmat copies the sequence.

 Name = string ({'Li'; 'Diaz'});
 Visit = datetime (2024, 1, [5; 6]);
 T = table (Name, Visit)
T =
  2x2 table

     Name        Visit       
    ______    ___________    

    "Li"      05-Jan-2024    
    "Diaz"    06-Jan-2024
 repmat (T, 3, 1)
ans =
  6x2 table

     Name        Visit       
    ______    ___________    

    "Li"      05-Jan-2024    
    "Diaz"    06-Jan-2024    
    "Li"      05-Jan-2024    
    "Diaz"    06-Jan-2024    
    "Li"      05-Jan-2024    
    "Diaz"    06-Jan-2024