Data Set Links (Coding)
Data set links are stored in handles.datasetlinks{d}{x} and handles.datasetlinkinfo{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})
handles.datasetlinkinfo{d}{x} is a cell array of event names indicating which events should trigger this link. Not all events are actually affected by links (if an unsupported event name is in this list, it will have no effect.) Continuing the above example, if handles.datasetlinkinfo{1}{5}={'isfiltered','xdials'}, then changing the filter values for the 5th variable in the 1st dataset will simultaneously update the filters on the 1st variable in d=2 and the 3rd variable in d=4. Similarly, changing the current value of 5/1 will match this value in 1/2 and 3/4.
If handles.datasetlinkinfo{d}{x} is empty, then the link effectively does not exist. (Use this to temporarily disable a link).
To do: Figure out how to support row selection/recoloring/visibility with linked data sets. Ideas: For discrete variables, selected rows in linked data sets if any row in the originating data set has that value. For continuous variables, use the high/low limits of the selection to determine which rows to select in linked data sets.