Builds and solves a simple linear program

echo on

n = 100;
A = randn(0.5*n,n);
b = randn(0.5*n,1);
c = randn(n,1);
d = randn;
cvx_begin
   variable x(n)
   dual variables y z
   minimize( c' * x + d )
   subject to
      y : A * x == b;
      z : x >= 0;
cvx_end

echo off
 
Calling SeDuMi: 100 variables (0 free), 50 equality constraints
------------------------------------------------------------------------
SeDuMi 1.1 by AdvOL, 2005 and Jos F. Sturm, 1998, 2001-2003.
Alg = 2: xz-corrector, Adaptive Step-Differentiation, theta = 0.250, beta = 0.500
eqs m = 50, order n = 101, dim = 101, blocks = 1
nnz(A) = 5000 + 0, nnz(ADA) = 2500, nnz(L) = 1275
 it :     b*y       gap    delta  rate   t/tP*  t/tD*   feas cg cg  prec
  0 :            5.89E+000 0.000
  1 : -3.33E+000 2.20E+000 0.000 0.3738 0.9000 0.9000   0.59  1  1  2.6E+001
  2 : -3.04E+000 8.57E-001 0.000 0.3892 0.9000 0.9000   0.90  1  1  1.3E+001
  3 : -3.11E+000 2.05E-001 0.000 0.2393 0.9000 0.9000   0.07  1  1  6.5E+000
  4 : -3.01E+000 6.67E-003 0.000 0.0325 0.9900 0.9900  -0.72  1  1  6.1E+000
  5 : -2.91E+000 1.54E-007 0.000 0.0000 1.0000 1.0000  -0.99  1  1  
Dual infeasible, primal improving direction found.
iter seconds  |Ax|    [Ay]_+     |x|       |y|
  5      0.0  6.7e-014  8.3e-021  3.1e+001  9.4e-021

Detailed timing (sec)
   Pre          IPM          Post
3.004E-002    4.006E-002    0.000E+000    
Max-norms: ||b||=3.633265e+000, ||c|| = 3.486412e+000,
Cholesky |add|=0, |skip| = 0, ||L.L|| = 1.
------------------------------------------------------------------------
Status: Unbounded
Optimal value (cvx_optval): -Inf