Re: Function to compares two arrays and returns indices where they are equivalent



In article <im6esm$k96$2@xxxxxxxxxxxxxxxxxxxxxxxxxx>,
glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx> wrote:

Nasser M. Abbasi <nma@xxxxxxxxx> wrote:
On 3/20/2011 3:38 PM, Ron Shepard wrote:

Yes, but it's not the same way. I don't use Matlab, but I do use
Mathematica, and it has the same kind of structure that function
names are global.

But Mathemtica resolved this problem better than Matlab. In Mathematica,
system commands and symbols all start with Uppercase, and in addition,
they can not be overwritten explicity.

try to define a function which is allready a system function, and will
get an error:

Sqrt[x_]:=x^(1/2)
....
Sqrt[x_]} is Protected.

Unprotect[Sqrt]
Sqrt[x_]=x^3

This is all correct for built-in functions. I remember all that now
that you mention it. Sorry about being unclear.

My problems with this are usually my own functions where I'm copying
and pasting between different notebooks and I unknowingly happen to
have two functions with the same name. So I'm talking about
shooting myself in the foot, not shooting someone else's foot.

$.02 -Ron Shepard
.