diff util/SMALL_solve.m @ 140:31d2864dfdd4 ivand_dev

Audio Impainting additional constraints with cvx added
author Ivan Damnjanovic lnx <ivan.damnjanovic@eecs.qmul.ac.uk>
date Mon, 25 Jul 2011 17:27:05 +0100
parents 8e660fd14774
children 0de08f68256b a4d0977d4595
line wrap: on
line diff
--- a/util/SMALL_solve.m	Thu Jul 21 16:37:14 2011 +0100
+++ b/util/SMALL_solve.m	Mon Jul 25 17:27:05 2011 +0100
@@ -39,7 +39,10 @@
     b = Problem.b;            % The right-hand-side vector.
 end
 %%
-fprintf('\nStarting solver %s... \n', solver.name);
+if (solver.profile)
+    fprintf('\nStarting solver %s... \n', solver.name);
+end
+
 start=cputime;
 tStart=tic;
 if strcmpi(solver.toolbox,'sparselab')
@@ -93,8 +96,10 @@
 %   Sparse representation time
 tElapsed=toc(tStart);
 solver.time = cputime - start;
-fprintf('Solver %s finished task in %2f seconds (cpu time). \n', solver.name, solver.time);
-fprintf('Solver %s finished task in %2f seconds (tic-toc time). \n', solver.name, tElapsed);
+if (solver.profile)
+    fprintf('Solver %s finished task in %2f seconds (cpu time). \n', solver.name, solver.time);
+    fprintf('Solver %s finished task in %2f seconds (tic-toc time). \n', solver.name, tElapsed);
+end
 solver.time=tElapsed;
 % geting around out of memory problem when converting big matrix from
 % sparse to full...
@@ -105,7 +110,7 @@
     solver.solution = full(y);
 end
 if isfield(Problem,'reconstruct')
-%   Reconstruct the signal from the solution
-solver.reconstructed  = Problem.reconstruct(solver.solution);
+    %   Reconstruct the signal from the solution
+    solver.reconstructed  = Problem.reconstruct(solver.solution);
 end
 end