Data Set Links (Coding)
Data set links are stored in handles.datasetlinks{d}{x}. Each link is stored as a one-way link, so when two-way links are created, they are stored here as a pair of one-way links. The values in handles.datasetlinks{d}{x} are n-by-2 arrays. The array has n rows, where n is the number of links from variable x in dataset d to another dataset. The first column of this array contains the index of the dataset being linked to, and the second column contains the index of the variable in that dataset being linked to.
For example, handles.datasetlinks{1}{5}=[2 1;4 3] means that dataset 1 is linked to data sets 2 and 4 by the 5th variable in data set 1, which corresponds to the 1st variable in dataset 2 and corresponds to the 3rd variable in data set 4. This does not necessarily imply that these links go back the other way or that dataset 2 is linked to dataset 4. (That would depend on what is stored in handles.datasetlinks{2}{1} and handles.datasetlinks{4}{3})