Hi Folks, I am trying to manipulate some vectors and I can't get what I want.
What I have is a list of vectors that are brought in via RCOLS: ($sector,$rtcRate,$subPack,$time,$badPhy, $goodMac, $goodPhy) I am trying to calculate a value on a per unit time where there are : $sectors = 1..3; $rtcRate = 1..12; $subPack = 1..4; $time = serialized number representing mmddYYYYHHMM; $badPhy = number of bad physical packets per subpacket per rtcRate per sector. $goodMac = number of good MAC bytes subpacket per rtcRate per sector - not used for this calculation $goodPhy = number of good physical packets per subpacket per rtcRate per sector. Example of data: 1,1,1,111620100000,0.00,605865.00,46605.00 1,1,2,111620100000,0.00,46189.00,3553.00 1,1,3,111620100000,0.00,18616.00,1432.00 1,1,4,111620100000,273.00,9529.00,733.00 What I need is to get a per sector throughput value per unit time where the throughput is calculated as: rtcRatePacksize * Sum($goodPhy)/ (number of elements in a time capture) across all $subPack for each $rtcRate per unit time. So the return vector should have throughput for each time change, like so: 203.234 111620100000 204.221 111620100030 220.111 111620100100 My thought to do this was to create index vectors for the $sectors, $rtcRate, $subPack and $time that were their uniq index values. $sectInd=uniq($sector);$rtcRateInd=uniq($rtcRate);$subPackInd=uniq($subPack);$timeStamp=uniq($time); Then I would do: ($packRate)=where ($goodPhy, $sectors==$sectInd & $rtcRate=$rtcRateInd & $subPack==$subPackInd & $time=$timeStamp)->sum(); but I get the following error: Runtime error: PDL: PDL::Ops::eq(a,b,c): Parameter 'b' PDL: Mismatched implicit thread dimension 0: should be 48384, is 3 So it seems I am not applying the indices correctly. Where can I find examples of doing this sort of operation? Thanks CLIFF SOBCHUK Ericsson Core RF Engineering Calgary, AB, Canada Phone 613-667-1974 ECN 8109 x71974 Mobile 403-819-9233 [email protected]<mailto:[email protected]> yahoo: sobchuk www.ericsson.com [http://www.ericsson.com/shared/images/Email.gif]<http://www.ericsson.com/> "The author works for Telefonaktiebolaget L M Ericsson ("Ericsson"), who is solely responsible for this email and its contents. All inquiries regarding this email should be addressed to Ericsson. The web site for Ericsson is www.ericsson.com." This Communication is Confidential. We only send and receive email on the basis of the terms set out at www.ericsson.com/email_disclaimer<http://www.ericsson.com/email_disclaimer>
<<inline: Email_line.gif>>
<<inline: Email.gif>>
_______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
