MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to define a polyfunction?


Hi,

in the last case it's easy as well:

golf[t_] := t^2 - t

keycond[tau_?NumericQ] := Module[{t}, TrueQ[D[golf[t], t] > 0 /. t ->
tau]]

Key[t_?NumericQ] /; keycond[t] := t^4 + t*3

Key[t_?NumericQ] := (t^2.5 - t)


Regards
  Jens

liwen liwen wrote:
> 
> Dear friend,
>          How are you!Now I encounter a problem that I
> can not solve for a long time .
> It can be express simplely as how to define a
> polyfunction,for example,a simple polyfunction may be
> defined as that:
> 
> Key[t_]:=If[(t>0),1,0];
> 
> It is easy to define.However,it will be more difficult
> when the condition turns more complicate.For instance:
> golf=t^2-t;
> Key[t_]:=If[(D[golf[t],t]>0),(t^4+t*3),(t^2.5-t)];
> 
> Best regards,
> 
> Liwen
> E-mail:  gzgear at yahoo.com
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/


  • Prev by Date: Re: Fresnel's Reflectivity
  • Next by Date: converting hex strings
  • Previous by thread: RE: How to define a polyfunction?
  • Next by thread: Re: How to define a polyfunction?