Hey everyone,
I have two files which contain numbers such as:
Code:
gnychis@monster ~/school/thesis/host_analysis/detection $ cat test1
1
2
3
4
gnychis@monster ~/school/thesis/host_analysis/detection $ cat test2
2
3
Here is the current status of my script, i read in both files to matrixes:
Code:
function [] = correlations ( filename1, filename2); % read in params
warning off
[set1] = textread(filename1, '%d');
[set2] = textread(filename2, '%d');
set1
set2
So if I run it with "sets_test test1 test2" i see:
Code:
set11 =
1
2
3
4
set2 =
2
3
Now what I want to do is be able to say something like "2 out of 2 values from set2 exist in set1" and "2 out of 4 values from set1 exist in set2"
So I am looking for some way to compare the two matrix and how many elements from one belong in the other. I'd greatly appreciate any help!
Thanks!
George