If and ReplaceAll
- To: mathgroup at smc.vnet.net
- Subject: [mg102851] If and ReplaceAll
- From: wiso <gtu2003 at alice.it>
- Date: Sat, 29 Aug 2009 06:33:14 -0400 (EDT)
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
- Follow-Ups:
- Re: If and ReplaceAll
- From: Leonid Shifrin <lshifr@gmail.com>
- Re: If and ReplaceAll
- From: "Scot T. Martin" <smartin@seas.harvard.edu>
- Re: If and ReplaceAll