When building a measurement scheme, reciprocals are generated without our knowledge. Thus generating reciprocals when there are already few reciprocals makes redundant reciprocals. Thus removing reciprocals before generating them is essential to have not more than one reciprocal. This code does it. The picture with color-coded arrows are the reciprocals which are removed keeping only the direct quadrupoles in the output. The output is sure to contain no reciprocals.
Sathyanarayan Rao (2020). Remove reciprocals from a Electrical Impedance Tomography (EIT) scheme (https://www.mathworks.com/matlabcentral/fileexchange/64620-remove-reciprocals-from-a-electrical-impedance-tomography-eit-scheme), MATLAB Central File Exchange. Retrieved .
generate_reciprocals was missing