Welcome to the Monastery | |
PerlMonks |
intersection of scalar with 1D array and 2D array Matlab=>Perlby f77coder (Beadle) |
on Aug 30, 2014 at 02:58 UTC ( [id://1099055]=perlquestion: print w/replies, xml ) | Need Help?? |
f77coder has asked for the wisdom of the Perl Monks concerning the following question:
Hello, I'm converting some Matlab code into perl. Here's the Matlab code.
dataD is a 2D array, dataT is a 1D array m is a scalar value read from a file a=returns index if there is one and null if it doesn't and b=value at index a Basically what this does is the following
I'm reading through this http://perldoc.perl.org/perlfaq4.html#How-do-I-test-whether-two-arrays-or-hashes-are-equal%3f but this assumes that the arrays are of equal dimensions (1D). I'd like to know what is the simplest and fastest way?
Thanks for any help.
Back to
Seekers of Perl Wisdom
|
|