| Author |
Comment/Response |
Carl Woll
|
09/15/99 7:18pm
> >
> I would like to define a function with two variables, as follow:
>
> f[x_,y_]:= g[x,y] if x not equal to y
> f[x_,y_]:= h[x] if y=x
>
> I don't know how to do this, and would appreciate any help.
> Thanks in advance
> Robin
Robin,
One idea is to use multiple definitions, as in
f[x_,x_]:=h[x]
f[x_,y_]:=g[x,y]
Carl Woll
Physics Dept
U of Washington
URL: , |
|