function strs = importstructurestr(ud, str2bshorten)
% IMPORTSTRUCTURESTR  Import Tab Filter Structure strings
%
% STRS = IMPORTSTRUCTURESTR returns a cell array of filter structure options 
% which are available in the popupmenu on the import tab.
%
% STRS = IMPORTSTRUCTURESTR(str2bshorten) Converts the currently selected filter 
% structure string in the popupmenu and stored in the userdata to a shorten string 
% used by the code.
%
% Inputs:
%  ud           - FDATool's UserData structure.
%  str2bshorten - a string representing the currently selected filter 
%                  structure option.
% Output:
%   strs - a string or cell array of filter structure strings used by the 
%          import tab.

%   Author(s): P. Pacheco, P. Costa
%   Copyright 1988-2000 The MathWorks, Inc.
%   $Revision: 1.3 $  $Date: 2000/06/13 21:23:16 $ 

% Filter Structure options 
strs = {'Direct form I',... 
        'Direct form II',... 
        'Direct form I transposed',... 
        'Direct form II transposed',...
        'Direct form II (Second-order sections)',...
        'Lattice allpass',... 
        'Lattice MA min. phase',... 
        'Lattice MA max. phase',... 
        'Lattice ARMA',... 
        'State-space'};
if ud.flags.fdqexists,
    strs = {strs{:},'Quantized filter (Qfilt object)'};
end

% Return a shorten version of the Filter Structure to be used 
% throughout the code.  We cannot use filterstructure(obj) because
% of the SOS case.
if nargin == 2,
    switch str2bshorten,
    case strs(1),   strs = 'df1';
    case strs(2),   strs = 'df2';
    case strs(3),   strs = 'df1t';
    case strs(4),   strs = 'df2t';        
    case strs(5),   strs = 'sos';
    case strs(6),   strs = 'lattaps';
    case strs(7),   strs = 'lattmamin';
    case strs(8),   strs = 'lattmamax';
    case strs(9),   strs = 'lattarma';   
    case strs(10),  strs = 'ss';
    case strs(11),  strs = 'qfilt';
    otherwise
        filtstructStr = str2bshorten;
        error('FDATool Internal Error: Unknown filter structure.');
    end 
end

% [EOF] importstrcuturestr.m
