MathGroup Archive 2006

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

Search the Archive

Function defined with If

  • To: mathgroup at
  • Subject: [mg71338] Function defined with If
  • From: "Julian Aguirre" <julian.aguirre at>
  • Date: Wed, 15 Nov 2006 06:43:52 -0500 (EST)

Dear group,

I am trying to define a function of the variables x, y through other
quantities depending on x and y and the function If. A minimal example

a = x;
b = y;
f[ x_, y_ ] = If[ a < b, a, b ]
If[ x < y, a, b ]

How can I force Mathematica to return If[ x < y, x, y ], as I thought
it would?

Thaks in advance,

Julián Aguirre

  • Prev by Date: Re: List difference using patterns and substitutions.
  • Next by Date: Re: Arithmetic Puzzle (so simple it's hard)
  • Previous by thread: Re: Binomial Distribution
  • Next by thread: Re: Function defined with If