in reply to Re: Boolean array indexing
in thread Boolean array indexing
Thank you very much, linuxer, this is indeed one line :-)
Still, is there no built-in function in perl which returns the indices of an array based on a boolean query?
I am moving to perl from matlab (don't want to get into fights about which programming languages are the best (or whether matlab can be considered as one in the first place ;-)), but I think matlab has an edge here, since the equivalent matlab code would be:
a=a(find(b>1))
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Boolean array indexing
by hdb (Monsignor) on Nov 21, 2013 at 22:38 UTC | |
|
Re^3: Boolean array indexing
by GrandFather (Saint) on Nov 21, 2013 at 22:35 UTC | |
|
Re^3: Boolean array indexing
by hdb (Monsignor) on Nov 21, 2013 at 22:49 UTC |