diff util/SMALL_plot.m @ 8:33850553b702

(none)
author idamnjanovic
date Mon, 22 Mar 2010 10:56:54 +0000
parents 7750624e0c73
children fc395272d53e
line wrap: on
line diff
--- a/util/SMALL_plot.m	Mon Mar 22 10:47:17 2010 +0000
+++ b/util/SMALL_plot.m	Mon Mar 22 10:56:54 2010 +0000
@@ -4,20 +4,22 @@
   % reconstructed signal
 
   figure;
-
-  plot(1:length(SMALL.solver.solution), SMALL.solver.solution, 'b');
-        title(['Coefficients of the reconstructed signal using ', SMALL.solver.name, ' with parameters ', SMALL.solver.param])
+ 
+  m=size(SMALL.solver,2);
+  n=size(SMALL.solver(1).reconstructed,2)+1;
+  for i =1:m
+  
+  subplot(m,n, (i-1)*n+1); plot(1:length(SMALL.solver(i).solution), SMALL.solver(i).solution, 'b')
+        title([ SMALL.solver(i).name,'(', SMALL.solver(i).param,')'])
           xlabel('Coefficient') 
      
-  % Use SMALL.solution to reconstruct the signal.
-
   % Plot reconstructed signal against original
 
   
-  for i=1:size(SMALL.solver.reconstructed,2)
-      figure;
-      plot(1:length(SMALL.solver.reconstructed(:,i)), SMALL.solver.reconstructed(:,i)  ,'b.-',  1:length(SMALL.Problem.signal(:,i)), SMALL.Problem.signal(:,i),'r--');
-          legend(SMALL.solver.name,'Original signal');
+  for j=2:n
+      
+      subplot(m,n,(i-1)*n+j); plot(1:length(SMALL.solver(i).reconstructed(:,j-1)), SMALL.solver(i).reconstructed(:,j-1)  ,'b.-',  1:length(SMALL.Problem.signal(:,j-1)), SMALL.Problem.signal(:,j-1),'r--')
+          %legend(SMALL.solver(i).name,'Original signal',0);
               title('Reconstructed and original signals');
   end
 end