MATLAB: How to append matrix value from lookup list

lookup listmatrix manipulation

I have the following matrix A =
0 34.5 10 3 22.753 8.9632
0 34.5 10 7 22.753 8.9632
0 68.9 10 3 22.753 8.9632
0 68.9 10 7 22.753 8.9632
0 137.9 10 3 22.753 8.9632
0 137.9 10 7 22.753 8.9632
0 206.8 10 3 22.753 8.9632
0 206.8 10 7 22.753 8.9632
0 275.8 10 3 22.753 8.9632
0 275.8 10 7 22.753 8.9632
10 34.5 10 3 22.753 8.9632
10 34.5 10 7 22.753 8.9632
10 68.9 10 3 22.753 8.9632
10 68.9 10 7 22.753 8.9632
10 137.9 10 3 22.753 8.9632
10 137.9 10 7 22.753 8.9632
10 206.8 10 3 22.753 8.9632
10 206.8 10 7 22.753 8.9632
10 275.8 10 3 22.753 8.9632
10 275.8 10 7 22.753 8.9632
I want to insert a new column to the right containing values from the following lookup list
B =
0 34.5 328.5
0 68.9 415.6
0 137.9 589.6
0 206.8 727.9
0 275.8 856.1
10 34.5 307.4
10 68.9 362
10 137.9 541.6
10 206.8 695.6
10 275.8 856.1
20 34.5 263.9
20 68.9 337.5
20 137.9 503.8
20 206.8 635.3
20 275.8 749
30 34.5 224.9
30 68.9 297.4
30 137.9 437.9
30 206.8 573.9
30 275.8 673.1
The values in the new columns in A is based on the lookup list of B.
Manually, I would expect something like this
C =
0 34.5 10 3 22.753 8.9632 328.5
0 34.5 10 7 22.753 8.9632 328.5
0 68.9 10 3 22.753 8.9632 415.6
0 68.9 10 7 22.753 8.9632 415.6
0 137.9 10 3 22.753 8.9632 589.6
0 137.9 10 7 22.753 8.9632 589.6
0 206.8 10 3 22.753 8.9632 727.9
0 206.8 10 7 22.753 8.9632 727.9
etc...
Notice the last column of C is based on the values in A column 1 and 2 which is matched with the lookup list in B column 1 and 2.
Can anyone help me.

Best Answer

Perhaps:
[LiA, LocB] = ismember(A(:, 1:2), B(:, 1:2), 'rows');
C = [A, B(LocB, 3)]
Use ismembertol to consider numerical rounding errors.