MathGroup Archive 2009

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

Search the Archive

Re: Putting an If in my function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg101063] Re: Putting an If in my function
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Tue, 23 Jun 2009 07:04:27 -0400 (EDT)
  • References: <h1neun$8rk$1@smc.vnet.net>

Hi,

Function[{a, g, f, x, d, w},
  If[g == w, d + a*f*x,
   d (1 + (E^g - E^w)/f)^(f x) + (
    a (-1 + (1 + (E^g - E^w)/f)^(f x)) f)/(E^g - E^w)]]

?

Regards
   Jens

Lobotomy wrote:
> Hi, this is my function
> 
> #5 (1 + ((E^#2 - 1) - (E^#6 -
>             1))/#3)^(#3*#4) + (#1*((1 + (((E^#2 - 1) - (E^#6 -
>                  1))/#3))^(#3*#4) -
>         1))/(((E^#2 - 1) - (E^#6 - 1))/#3) &[a, g, f, x, d, w]
> 
> 
> in the case when w==g the denominator equals zero.
> 
> in this case i would like to rewrite the formula above to the much
> simpler
> d+a*n. How is this done? I've tried
> 
> If[w == g, % = d + a*n], but this is not working. Another thing is
> where to put the "If"
> 


  • Prev by Date: Re: Two questions about modification of a matrix.
  • Next by Date: Re: Two questions about modification of a matrix.
  • Previous by thread: Re: Putting an If in my function
  • Next by thread: Re: Putting an If in my function