Processing math: 100%

Setup

Once you have downloaded POGS, open MATLAB and type

1
>> cd <pogs>/src/interface_matlab

in the MATLAB console. The string

1
<pogs>
must be replaced with the directory to which POGS was downloaded. To compile wrapper type

1
>> pogs_setup

Alternatively typing

1
>> pogs_setup gpu

will compile the GPU version.

MATLAB-specific usage

The MATLAB interface is a single MEX-function, with signature

1
[x, y, l, optval] = pogs(A, f, g, params)

Inputs:

  • 1
    A
    
    is the data matrix of dimension mn.
  • 1
    f
    
    and
    1
    g
    
    are structs with fields
    1
    h
    
    ,
    1
    a
    
    ,
    1
    b
    
    ,
    1
    c
    
    ,
    1
    d
    
    and
    1
    e
    
    , each of which must either be a vector of dimension m (resp. n) or a scalar. If a scalar is specified, then it is assumed that the scalar should be repeated m (resp. n) times. Multiple problems can be solved with the same matrix A, if
    1
    f
    
    and
    1
    g
    
    are specified as struct arrays.

Optional Inputs:

  • 1
    params
    
    is a struct with fields
    1
    rel_tol
    
    ,
    1
    abs_tol
    
    ,
    1
    rho
    
    ,
    1
    max_iter
    
    ,
    1
    quiet
    
    and
    1
    adaptive_rho
    
    .

Outputs:

  • 1
    x
    
    and
    1
    y
    
    are the solution vectors xpogs resp. ypogs, and have dimension m resp. n.
  • 1
    l
    
    is the dual variable λpogs corresponding to the constraint Ax=y and has dimension m.
  • 1
    optval
    
    is the value of the objective ppogs at the solution (ppogs=f(ypogs)+g(xpogs)).

For more information type

1
>> help pogs

h-Functions

The values

1
f.h
and
1
g.h
can be specified using one of 16 functions. These are

1
2
kAbs,      kExp,     kHuber,   kIdentity, kIndBox01, kIndEq0,  kIndGe0,  kIndLe0,
kLogistic, kMaxNeg0, kMaxPos0, kNegEntr,  kNegLog,   kRecipr,  kSquare,  kZero

For example to specify that gj(xj)=|xj| for j=14 and g5(x5)=I(x5=0), use the syntax

1
>> g.h = [kAbs(4); kIndEq0];

See Functions for a more detailed explanation of the functions and their usage.

Example Usage

See the examples listed on the left-hand side under Examples.