Omit Duplicate RowsTo omit any rows in a table that are duplicated, use the unique function.Tnew = unique(Tnew);
size(Tnew)ans = 1×2106 8unique deleted two duplicate rows.Delete Rows by Row NumberDelete rows 18, 20, and 21 from the table.Tnew([18,20,21],:) = [];
size(Tnew)ans = 1×2103 8The table contains information on 103 patients now.Delete Rows by Row NameFirst, specify the variable of identifiers, LastName, as row names. Then, delete the
variable, LastName, from Tnew. Finally, use the row name to index and delete rows.Tnew.Properties.RowNames = Tnew.LastName;
Tnew.LastName = [];
Tnew('Smith',:) = [];
size(Tnew)ans = 1×2102 7The table now has one less row and one less variable.9 Tables