I am trying to make a new matrix of n rows and 7 columns, but my code only outputs the first column.
%sample values
table_a = [161.0972 11.0000 14.0000 1.0000 0 0 0;
163.0401 9.0000 8.0000 3.0000 0 0 0;
163.0765 10.0000 12.0000 2.0000 0 0 0;
163.1129 11.0000 16.0000 1.0000 0 0 0;
165.0194 8.0000 6.0000 4.0000 0 0 0;
165.0558 9.0000 10.0000 3.0000 0 0 0;
165.0922 10.0000 14.0000 2.0000 0 0 0]
table_b = [163.0401 9.0000 8.0000 3.0000 0 0 0;
163.0765 10.0000 12.0000 2.0000 0 0 0;
165.0558 9.0000 10.0000 3.0000 0 0 0;
165.0922 10.0000 14.0000 2.0000 0 0 0;
167.0350 8.0000 8.0000 4.0000 0 0 0;
167.0714 9.0000 12.0000 3.0000 0 0 0;
169.0143 7.0000 6.0000 5.0000 0 0 0]
table_c = table_a(~ismember(table_a(:, 1:7), table_b(:, 1:7)));
This is what I yield:
table_c =
163.0401
163.0765
165.0922
This is what I expect to yield:
table_c =
163.0401 9.0000 8.0000 3.0000 0 0 0
163.0765 10.0000 12.0000 2.0000 0 0 0
165.0922 10.0000 14.0000 2.0000 0 0 0