table

Methods

Method Reference: table.isrow

table: TF = isrow (tbl)

Test input table for being a row vector.

TF = isrow (tbl) returns true if the input table tbl has a single row.

Source Code: table

Example: 1

A table is a row when it has exactly one row of data, whatever the number of variables.

 T1 = table (38, true, 71, 'VariableNames', {'Age', 'Smoker', 'Height'})
T1 =
  1x3 table

    Age    Smoker    Height    
    ___    ______    ______    

     38    true          71
 isrow (T1)
ans = 1

Add a second row and it is no longer a row vector.

 T2 = table ([38; 43], [true; false], [71; 69])
T2 =
  2x3 table

    Var1    Var2     Var3    
    ____    _____    ____    

      38    true       71    
      43    false      69
 isrow (T2)
ans = 0