Hi all, I have two files,one is label file,another is thickness file, they are one to one correspondence, for example: the label file is : 2 2 3 2 1 3 4 5 2 5 1 4 ...... the thickness file is: 0.3 0.8 0.2 0.1 2.4 0.9 3.2 0.2 0.1 0.3 2.1 2.3 ...... Now I want to calculate the sum and mean thickness of the same labeled, just like this: label 1 : 2.4 label 2 : (0.3+0.8+0.1 +0.1)/4 label 3 : (0.2+2.4)/2 label 4 : (3.2+2.3)/2 label 5 : (0.2+0.3)/2 ....... and then there is also a index [3 4] to select the label, so in the end ,I want to get the sum and mean of (0.2+2.4)/2, (3.2+2.3)/2.
I'm a beginner to perl, and don't know how to implement this with perl,could you give me some suggestion? thanks in advance! bin lv 2008-06-26 The Key Lab of Complex Systems and Intelligence Science, Institute of Automation, Chinese Academy of Sciences.