Hi All,
Lets say I have multiple unique data sets:
data1.gamma = [1,2,3,4,5,6,7,8,9,10];data1.eta = [0.1,0.4,0.9,0,0.2,0.5,0.7,0.8,0.9,0.10];data1.phi ........data2.gamma = [0,2,0,4,5,9,7,10,9,6];data2.eta = [0.1,0.4,0.9,0,0.2,0.5,0.7,0.8,0.9,0.10];data2.phi ........
and data3, data4 etc as such.
I would like to write a function that can to compare all the data sets and on each data set only keep variable values where
data.gamma
is the same. Any idea how I would go about doing that? I can compare and match 2 data sets. However I am not sure how to compare multiple data sets.
Also I do not know how many data set there will be (data1,data2,data3,data4….). So how do I make the function "scale-up" as necessary. Is that even possible without predefined the variable names?
Any help would be much appreciated.
Best Answer