I have two files, and I want to count for both files how many times the values are repeated in a certain column. And if the repeated values appear in both files (for instance: value 0.5 appears repeated in file A and also in file B) I want their counting to be divided.
Example: in file A, column 1 I have 230 number "2" , 430 number "3"....etc
in file B, column 1 I have 500 number "2" , 620 number "3"....etc
After that I need to divide 230 by 430.
500 by 620....and so on.
That's what I did so far:
A = load('fileA.csv');
B = load('fileB.csv');
a = A(:,1);
b = B(:,1);
So, in mag_a I have a list of numbers, and in count_a how many times these numbers appear repeated. Same for mag_b and count_b.
I don't know how to tell the program something like: If number "x" is repeated in A and also in B, count and divide the counting.