Hi all ,
I have a list of $a $b values which can go from (-180 — 180)

For example:
100 2
-2 44
332 9
26 -4
332 9
0 -1
———————————–
I want to creat a 2 dimentional array 361×361 and set it to zero then start recording the count of combnation $a $b the combanation of 332 and 9 appered twice on the list so the count will be 2

can i do some thing like this ?
———————–
my @a = ((0) x 361);

my @b = ((0) x 361);

my @matrix = (@a,@b)

while ($line = )
{
@record = split(/\s+/, $line);
$a = $record[0];
$b = $record[1];
@matrix [$a+180][$b+180] ++;
}

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)