I am writhing a code in OCTAVE(C++) where I have 2 matrices that I want merge together. I need to have the values from the first matrix to be intersected with the values from the second matrix. I'm struggling to explain this in words, so hopefully my real world data below will help.
matrix_1 = [67.06582, 14.52026, 0.00000, -5.26088, -19.44268, -21.60000]
matrix_2 = [77.79444, -0.00000, -0.61309, -10.46707, -21.60000, -20.30657]
output = [67.06582, 77.79444, 14.52026, -0.00000, 0.00000, -0.61309.......]
What is the best way to accomplish this?