metrique2 is a matrix with rows and columns, let's call them R and C.
metrique2(i, :) or metrique2(j, :) is the i'th or j'th row of that matrix. So it's a row vector with 1 row and C columns.
metrique2(i, :)' or metrique2(j, :)' transposes that row vector into a column vector. So it's a column vector with C rows and 1 column.
Now, when you construct a new matrix using a space or comma between the terms, it stitched them together horizontally. So that means that they must all have the same number of rows. You can't stitch a 10x1 vector onto a 99x1 vector because the bottom would be "ragged" which is not allowed.
Now we know that metrique2(i, :)' and metrique2(j, :)' defintely both have C rows, so the error is saying that I1 does not have C rows. Perhaps it is a row vector instead of a column vector. Perhaps it has as many elements as rows in metrique2 instead of as columns as metrique2. I don't know. How do we find out. Put these lines before the line that throws the error