Re: Specifying arguments inside nested functions

• To: mathgroup at smc.vnet.net
• Subject: [mg46117] Re: Specifying arguments inside nested functions
• From: "Bo Le" <bole79 at email.si>
• Date: Sat, 7 Feb 2004 04:01:59 -0500 (EST)
• References: <bvvnse\$j7v\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Helo,

I don't really understand your specific problem with matricies,
but like you, I also had the same problem with specifying arguments
inside the nested functions.

I am solving this problem with the Function[{vars},body],
which is the construct behind the infix notation and marking local
variables is what you want, right?

Bye!

Borut
Slovenia

"Ray Koopman" <koopman at sfu.ca> wrote in message news:bvvnse\$j7v\$1 at smc.vnet.net...
> I have two matrices, A and B, that have the same number of columns.
> I want to select the rows of A that differ in every position from
> every row of B. So I write
>
>    Select[A, And@@Map[Inner[Unequal,#1,#2,And]&, B]& ]
>
> But that won't work, because I have no way to tell Inner that one of
> its arguments should be the row of A that is being tested by Select,
> and the other argument should be the row of B from Map.
>
> Now, I realize that there are ways around the problem in this
> particular case. For instance, the Select test could be
>
>    And@@Map[FreeQ[Rest[#],First[#]]&, Transpose@Prepend[B,#]]&
>
> which checks B a column at a time and might well be more efficient.
> However, this is not the first time I've run into the problem of
> specifying arguments inside nested functions, and I wonder how other
> people handle it. Is there a general solution, or must I always
>

```

• Prev by Date: Re: random numbers?
• Next by Date: Re: Find last NZ in list
• Previous by thread: Re: Specifying arguments inside nested functions
• Next by thread: Re: Specifying arguments inside nested functions