Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Defining a function and forcing max or min value

Hi,

Is it possible to define a funtion, say f, and have it be the maximum (or minimum) of another function and a constant?

Example (pseudo-script): if g(x)=log(abs(x)), let f(x)=g(x) if g(x)<0, and f(x)=0 for all g(x)<0

Thanks N.C.

Defining a function and forcing max or min value

Hi,

Is it possible to define a funtion, say f, and have it be the maximum (or minimum) of another function and a constant?

Example (pseudo-script): if g(x)=log(abs(x)), let f(x)=g(x) if g(x)<0, g(x)>0, and f(x)=0 for all g(x)<0

Thanks N.C.

click to hide/show revision 3
retagged

updated 2012-04-17 08:25:34 -0600

kcrisman gravatar image

Defining a function and forcing max or min value

Hi,

Is it possible to define a funtion, say f, and have it be the maximum (or minimum) of another function and a constant?

Example (pseudo-script): if g(x)=log(abs(x)), let f(x)=g(x) if g(x)>0, and f(x)=0 for all g(x)<0

Thanks N.C.