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

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.