| Author |
Comment/Response |
Maneesh
|
05/06/03 10:32pm
Hi all, I have a table of values of the form:
thevalues={{1,2,3},{4,5,6},{7,8,9}}
Now if I define a simple function like:
sq[x_]:=x*x
and I say
sq[thevalues]
I get the expected result:
{{1,4,9},{16,25,36},{49,64,81}}
Now how come when I define a funtion like
Threshold[x]:=x/;x>0;
Threshold[x_]:=1;x<=0;
It works fine if I just give it a single argument,
but when I want to apply to all values in my Table it doesn't evaluate..?
Is there anything else I should do to my funciton definition?
URL: , |
|