Hi, basically the problem was that in the last line of the code I only had the name for one machid. When k=n, you need n names. So it should be machid=(mid1 mid2 mid3 …midn). In this way there are no more missing machid in the matched dataset.
... View more