diff examples/SMALL_solver_test.m @ 4:2d7d8736ce6c

(none)
author idamnjanovic
date Mon, 22 Mar 2010 10:42:47 +0000
parents 7750624e0c73
children ce03373b3761
line wrap: on
line diff
--- a/examples/SMALL_solver_test.m	Fri Mar 05 12:31:22 2010 +0000
+++ b/examples/SMALL_solver_test.m	Mon Mar 22 10:42:47 2010 +0000
@@ -51,79 +51,82 @@
 %%
 % Generate SPARCO problem 
   
-global SMALL
+
 SMALL.Problem = generateProblem(6, 'P', 6, 'm', 270,'n',1024, 'show');
 %%
-
+i=1;
 %%
 % SMALL Conjugate Gradient test 
-
-SMALL.solver.toolbox='SMALL';    
-SMALL.solver.name='SMALL_cgp';
+SMALL.solver(i)=SMALL_init_solver;
+SMALL.solver(i).toolbox='SMALL';    
+SMALL.solver(i).name='SMALL_cgp';
 
 % In the following string all parameters except matrix, measurement vector
 % and size of solution need to be specified. If you are not sure which
 % parameters are needed for particular solver type "help <Solver name>" in
 % MATLAB command line
 
-SMALL.solver.param='200, 1e-14';
+SMALL.solver(i).param='200, 1e-14';
 
-SMALL=SMALL_solve(SMALL);
+SMALL.solver(i)=SMALL_solve(SMALL.Problem,SMALL.solver(i));
 
 
-SMALL_plot(SMALL);
-
+i=i+1;
 %%
 % SMALL OMP with Cholesky update test 
-
-SMALL.solver.toolbox='SMALL';    
-SMALL.solver.name='SMALL_chol';
+SMALL.solver(i)=SMALL_init_solver;
+SMALL.solver(i).toolbox='SMALL';    
+SMALL.solver(i).name='SMALL_chol';
 
 % In the following string all parameters except matrix, measurement vector
 % and size of solution need to be specified. If you are not sure which
 % parameters are needed for particular solver type "help <Solver name>" in
 % MATLAB command line
 
-SMALL.solver.param='200, 1e-14';
+SMALL.solver(i).param='200, 1e-14';
 
-SMALL=SMALL_solve(SMALL);
+SMALL.solver(i)=SMALL_solve(SMALL.Problem, SMALL.solver(i));
 
-SMALL_plot(SMALL);
+i=i+1;
 %%
 % SolveOMP from SparseLab test 
 
-SMALL.solver.toolbox='SparseLab';  
-SMALL.solver.name='SolveOMP';
+SMALL.solver(i)=SMALL_init_solver;
+SMALL.solver(i).toolbox='SparseLab';  
+SMALL.solver(i).name='SolveOMP';
 
 % In the following string all parameters except matrix, measurement vector
 % and size of solution need to be specified. If you are not sure which
 % parameters are needed for particular solver type "help <Solver name>" in
 % MATLAB command line
 
-SMALL.solver.param='200, 0, 0, 0, 1e-14';
+SMALL.solver(i).param='200, 0, 0, 0, 1e-14';
 
-SMALL=SMALL_solve(SMALL);
+SMALL.solver(i)=SMALL_solve(SMALL.Problem, SMALL.solver(i));
 
-SMALL_plot(SMALL);
+i=i+1;
   
 %%
 % greed_pcgp from Sparsify test 
 
-SMALL.solver.toolbox='Sparsify';  
-SMALL.solver.name='greed_pcgp';
+SMALL.solver(i)=SMALL_init_solver;
+SMALL.solver(i).toolbox='Sparsify';  
+SMALL.solver(i).name='greed_pcgp';
 
 % In the following string all parameters except matrix, measurement vector
 % and size of solution need to be specified. If you are not sure which
 % parameters are needed for particular solver type "help <Solver name>" in
 % MATLAB command line
 
-SMALL.solver.param='''stopCrit'', ''M'', ''stopTol'', 200';
+SMALL.solver(i).param='''stopCrit'', ''M'', ''stopTol'', 200';
 
-SMALL=SMALL_solve(SMALL);
+SMALL.solver(i)=SMALL_solve(SMALL.Problem, SMALL.solver(i));
+
+%%
 
 SMALL_plot(SMALL);
   
-%%  
+
   
  
 end % function SMALL_solver_test