Home > source > @penlab > phibar.m

# phibar

## PURPOSE

log-penalty barrier function, t can be a scalar/vector/...

## SYNOPSIS

function [ret] = phibar(obj,t)

## DESCRIPTION

     log-penalty barrier function, t can be a scalar/vector/...

## CROSS-REFERENCE INFORMATION

This function calls:

This function is called by:

- penlab PenLab (Pennon Laboratory for Matlab, previously PennonM)

## SOURCE CODE

    0001 function [ret] = phibar(obj,t)
    0002 % log-penalty barrier function, t can be a scalar/vector/...
    0003 %
    0004
    0005   ret=t;    % otherwise the result would be a column vector
    0006   ind = find(t<0);
    0007   invind = find(t>=0);
    0008   ret(invind) = Inf;
    0009   ret(ind) = -log(-t(ind));
    0010   return;
    0011