Guruguhan,
Can I assume you have the data in memory?
Can I further assume the data is contained in an array of arrays?
Can I also further assume that the conditions you mentioned are AND'd?
(ie
the final result is the intersection of all conditions?)
Thus $data[0][0] = 0.200000 (aka, X1 from row 1)
Consider the following: (purposely written in readable perl)
my @filtered = ();
for( @data ){
push @filtered,$_ if
$$_[0] > 0.2 && $$_[0] < 0.3 && # 0.2 < x1 < 0.3
$$_[3] > 0.8 && # y1 > 0.8
$$_[5] > 15000 && $$_[5] < 30000; # 15000 < y3 < 30000
}
[EMAIL PROTECTED] data contains filtered result result.
Is that what you were thinking of?
Regards,
David le Blanc
--
Senior Technical Specialist
I d e n t i t y S o l u t i o n s
Level 1, 369 Camberwell Road, Melbourne, Vic 3124
Ph 03 9813 1388 Fax 03 9813 1688 Mobile 0417 595 550
Email [EMAIL PROTECTED]
-----Original Message-----
From: N, Guruguhan (GEAE, Foreign National, EACOE)
[mailto:[EMAIL PROTECTED]
Sent: Monday, 16 February 2004 10:47 PM
To: [EMAIL PROTECTED]
Subject: data filtering
Hi All,
I have a data set ( only a portion) as follows:
No. x1 x2 x3 y1 y2 y3
y4
1 0.200000 0.200000 0.200000 0.765685 75881.9 29289.3
-46592.6
2 0.200345 0.200000 0.200345 0.766661 75766.0 29268.4
-46497.6
3 0.200000 0.200345 0.200000 0.766030 75867.1 29259.8
-46607.4
4 0.359575 0.253987 0.359575 1.271019 43898.7 19675.6
-24223.1
5 0.359921 0.253987 0.359921 1.271995 43861.3 19666.1
-24195.2
This data set has to be filtered using the following conditions (
example only. in reality this can be anything):
0.2 < x1 < 0.3
y1 > 0.8
15000 < y3 < 30000
I have to filter the data set satisfying all the conditions.
Can somebody help me out to do the same. Any help in this regard is
solicited.
Thanks
Regards
Guruguhan
EACoE, India.
--
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/>
<http://learn.perl.org/first-response>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>