Hello everyone! Let's assume we have the vectors U and V:
U=[6 6 18 18 3 19 12 18 24 24 10 22 11 27 28 18 12 12];
V=[5 7 10 10 21 2 21 10 23 7 1 13 2 19 10 1 13 21];
The length of the vectors usually ranges from 9 to 20. We are trying to correspond each element of U to one element in V which satisfies certain conditions. For example, the right answer satisfies either U(j) = V(i) + abs(i-j) or U(j) = V(i) – abs(i-j)
The problem is using perms for length>9 goes to memory error. Any help is appreciated. I am running on a 32Bit. Thanks!
Best Answer