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
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
 
Calling sedumi: 100 variables, 50 equality constraints
------------------------------------------------------------
SeDuMi 1.21 by AdvOL, 2005-2008 and Jos F. Sturm, 1998-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 :            1.91E+00 0.000
  1 :   6.51E+00 7.19E-01 0.000 0.3772 0.9000 0.9000  -2.05  1  1  1.2E+02
  2 :   1.71E+01 2.87E-01 0.000 0.3993 0.9000 0.9000  -2.71  1  1  8.6E+01
  3 :   6.81E+01 9.45E-02 0.000 0.3293 0.9000 0.9000  -0.91  1  1  5.1E+01
  4 :   1.79E+02 6.68E-03 0.000 0.0706 0.9900 0.9900   0.17  1  1  6.1E+00
  5 :   2.83E+03 1.93E-04 0.000 0.0290 0.9900 0.9900  -0.58  1  1  2.7E+00
  6 :   1.37E+08 4.14E-09 0.000 0.0000 1.0000 1.0000  -0.99  1  1  
Primal infeasible, dual improving direction found.
iter seconds  |Ax|    [Ay]_+     |x|       |y|
  6      0.0   0.0e+00   0.0e+00   0.0e+00   1.4e+00

Detailed timing (sec)
   Pre          IPM          Post
2.000E-02    4.000E-02    0.000E+00    
Max-norms: ||b||=2.293764e+00, ||c|| = 2.563709e+00,
Cholesky |add|=0, |skip| = 0, ||L.L|| = 1.
------------------------------------------------------------
Status: Infeasible
Optimal value (cvx_optval): +Inf

echo off