
% lyngby_uis_sop_v     - Script for SOP view
%
%       See also: lyngby_fir_global, lyngby_ui_global

% cvs : $Id: lyngby_uis_sop_v.m,v 1.3 2000/05/16 15:06:19 mgl Exp $ 
%       $Revision: 1.3 $    



    if exist('RESULT_SOP_V') & ~isempty(RESULT_SOP_V)
      n = size(RESULT_SOP_U,2);
      if n == 1
%	sVol = 'Mean(data)|Std(data)|1st Image';
	sVol = '1st Image|Mean(data)|Std(data)';
	sTime = ['Time|Histogram|Canonicvalues|1 Canonicsequence|',...
	      '1 Canonicseq. & mean|2 Canonicseq. & mean'];
      elseif n == 2
%	sVol = 'Mean(data)|Std(data)|1st Image|2nd Image';
	sVol = '1st Image|2nd Image|Mean(data)|Std(data)';
	sTime = [ 'Time|Histogram|Canonicvalues|', ...
	      '1 Canonicsequence|2 Canonicsequence|',...
	      '1 Canonicseq. & mean|',...
	      '1-2 State-Space'];
      elseif n == 3
%	sVol = 'Mean(data)|Std(data)|1st Image|2nd Image|3rd Image';
	sVol = '1st Image|2nd Image|3rd Image|Mean(data)|Std(data)';
	sTime = [ 'Time|Histogram|Canonicvalues|' ...
	      '1 Canonicsequence|2 Canonicsequence|3 Canonicsequence',...
	      '1 Canonicseq. & mean|2 Canonicseq. & mean|',...
	      '3 Canonicseq. & mean|',...
	      '1-2 State-Space|1-3 State-Space|2-3 State-Space'];
      elseif n == 4
%	sVol = ['Mean(data)|Std(data)|1st Image|2nd Image|',...
%	      '3rd Image|4th Image'];
	sVol = ['1st Image|2nd Image|',...
	      '3rd Image|4th Image|Mean(data)|Std(data)'];
	sTime = [ 'Time|Histogram|Canonicvalues|' ...
	      '1 Canonicsequence|2 Canonicsequence|3 Canonicsequence|', ...
	      '4 Canonicsequence|5 Canonicsequence|6 Canonicsequence|', ...
	      '1 Canonicseq. & mean|2 Canonicseq. & mean|',...
	      '3 Canonicseq. & mean|4 Canonicseq. & mean|',...
	      '1-2 State-Space|1-3 State-Space|2-3 State-Space'];
      else 
%	sVol = ['Mean(data)|Std(data)|1st Image|2nd Image|',...
%	      '3rd Image|4th Image|5th Image'];
	sVol = ['1st Image|2nd Image|',...
	      '3rd Image|4th Image|5th Image|Mean(data)|Std(data)'];
	sTime = [ 'Time|Histogram|Canonicvalues|', ...
	      '1 Canonicsequence|2 Canonicsequence|3 Canonicsequence|', ...
	      '4 Canonicsequence|5 Canonicsequence|', ...
	      '1 Canonicseq. & mean|2 Canonicseq. & mean|',...
	      '3 Canonicseq. & mean|4 Canonicseq. & mean|',...
	      '5 Canonicseq. & mean|',...
	      '1-2 State-Space|1-3 State-Space|2-3 State-Space'];
	n = 5;
      end
      
%      lyngby_ui_view([ ...
%	    X_MEAN; X_STD; RESULT_SOP_V(:,1:n)' ... 
%	    ], ...
%	  sVol, ...
%	  'title', 'SOP', ...
%	  'callback','lyngby_ui_view_sop', 'CallbackType', sTime);

      lyngby_ui_view([ RESULT_SOP_V(:,1:n)' ; X_MEAN ; X_STD ], ...
	  sVol, ...
	  'title', 'SOP', ...
	  'callback','lyngby_ui_view_sop', 'CallbackType', sTime);
    
    else
      lyngby_ui_message(['There are no Strother OPLS '...
	    'results. Please press ''Calculate!''']);
    end
