diff util/SMALL_plot.m @ 1:7750624e0c73 version0.5

(none)
author idamnjanovic
date Thu, 05 Nov 2009 16:36:01 +0000
parents
children 33850553b702
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/util/SMALL_plot.m	Thu Nov 05 16:36:01 2009 +0000
@@ -0,0 +1,23 @@
+function SMALL_plot(SMALL)
+  % Ivan Damnjanovic 2009
+  % Function gets as input SMALL structure and plots  the solution and
+  % 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])
+          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');
+              title('Reconstructed and original signals');
+  end
+end