source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/opt/lmirank/lmiranktest.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 1.5 KB
Line 
1
2function [At,c,K,yfeas,y,info] = lmiranktest
3% [At,c,K,yfeas,y,info] = lmiranktest;
4%
5% LMIRANKTEST runs a test problem for LMIRANK. It uses randomly generated
6% feasible rank constrained LMI problems created by CREATERANDOMDATA.
7%
8% Problem parameters:
9%       nLP     : no. of LP inequalities. This can be 0.
10%       nF      : the Fi matrices are size nF x nF       
11%       nG      : the Gi matrices are size nG x nG
12%       r       : rank bound
13%       m       : number of variables
14%       maxiter : max. no. of iterations
15%
16% Outputs:  (LP ineq. data at the start of At and c is not shown)
17%       At          = -[vec(F1),...,vec(Fm);
18%                       vec(G1),...,vec(Gm)]
19%       c           = [vec(F0);
20%                      vec(G0)]
21%       yfeas       : known feasible solution
22%       y           : calculated solution
23%       info.solved : 1 if a solution was found, 0 otherwise
24%       info.cpusec : solution time
25%       info.iters  : no. of iterations required to find a solution
26%       info.gap    : constraint gap
27%       info.rank   : ranks (with respect to tolerance pars.eps)
28%
29% See also LMIRANK, CREATERANDOMDATA.
30
31% Author Robert Orsi
32% Feb 2005
33
34
35%%%% Random problem parameters
36nLP=3;
37nF=10;
38nG=10;
39r=5;
40m=20; 
41
42%%%% Max. no. of iterations
43maxiter=100;
44
45%%%% Create random data
46[At,c,K,yfeas] = createrandomdata(nF,nG,r,m);
47%%%% Add LP ineq. constraints
48At=[rand(nLP,m); At];
49c=[(At(1:nLP,:)*yfeas+max(randn(nLP,1),0)); c];
50K.l=nLP;
51
52%%%% Call LMIRank
53pars.maxiter=maxiter;
54[y,info] = lmirank(At,c,K,pars);
55
Note: See TracBrowser for help on using the repository browser.