MathGroup Archive 2009

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

Search the Archive

If and ReplaceAll


a = 2c;
ff[z_] := a;
ff[z] /. c -> 1


and I got 2. Ok, now:

a = 2 c;
f[z_] := If[z > 0, a, 0]
f[z] /. c -> 1

and I got:  If[z > 0, a, 0]
but I want: If[z > 0, 2, 0]

I tried to use Evaluate, FullSimplify... but nothing



  • Prev by Date: if only on parameter of 2D is to be shown in 3D
  • Next by Date: turn off mirroring of ChartElements?
  • Previous by thread: Re: if only on parameter of 2D is to be shown in 3D
  • Next by thread: Re: If and ReplaceAll