0001 function varargout = specwin_viewer(varargin)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 id = findobj('Tag', 'LTPDAspecwin_viewer');
0022 if ~isempty(id)
0023 figure(id)
0024 return
0025 end
0026
0027
0028
0029 Gproperties.Gcol = [240 240 240]/255;
0030 Gproperties.Gwidth = 800;
0031 Gproperties.Gheight = 400;
0032 Gproperties.Gborder = 10;
0033 fontsize = getappdata(0, 'ltpda_repo_gui_fontsize');
0034
0035 Gproperties.Screen = get(0,'screensize');
0036 Gproperties.Gposition = [150 ...
0037 150 ...
0038 Gproperties.Gwidth...
0039 Gproperties.Gheight];
0040
0041
0042 mainfig = figure('Name', 'LTPDA Spectral Window Viewer',...
0043 'NumberTitle', 'off',...
0044 'Visible','off',...
0045 'Position',Gproperties.Gposition,...
0046 'Color', Gproperties.Gcol,...
0047 'Toolbar', 'none',...
0048 'MenuBar', 'none',...
0049 'Resize', 'off',...
0050 'Tag', 'LTPDAspecwin_viewer');
0051
0052
0053 set(mainfig, 'CloseRequestFcn', {'ltpda_specwin_viewer_close', mainfig});
0054
0055
0056 setappdata(mainfig, 'Gproperties', Gproperties);
0057
0058
0059
0060
0061
0062 buildWindowSelectionMenu(mainfig);
0063
0064
0065
0066 sth = uicontrol(mainfig,'Style','text',...
0067 'String','Window Size',...
0068 'BackgroundColor', Gprops.Gcol, ...
0069 'Position',[10 Gprops.Gheight-70 80 25]);
0070
0071 eth = uicontrol(mainfig,'Style','edit',...
0072 'String','100',...
0073 'BackgroundColor', 'w', ...
0074 'Tag', 'LTPDA_specwin_viewer_WinSize', ...
0075 'Position',[100 Gprops.Gheight-70 120 25]);
0076
0077
0078
0079 sth = uicontrol(mainfig,'Style','text',...
0080 'String','Window PSLL',...
0081 'BackgroundColor', Gprops.Gcol, ...
0082 'Position',[10 Gprops.Gheight-100 80 25]);
0083
0084 eth = uicontrol(mainfig,'Style','edit',...
0085 'String','150',...
0086 'BackgroundColor', 'w', ...
0087 'Tag', 'LTPDA_specwin_viewer_PSLL', ...
0088 'Position',[100 Gprops.Gheight-100 120 25]);
0089
0090
0091 pbh = uicontrol(mainfig,'Style','pushbutton',...
0092 'String','Plot Time-domain',...
0093 'Callback', {'ltpda_specwin_viewer_build_window', 'Time-domain'}, ...
0094 'Position',[10 Gprops.Gheight-140 100 25]);
0095
0096
0097 pbh = uicontrol(mainfig,'Style','pushbutton',...
0098 'String','Plot Freq-domain',...
0099 'Callback', {'ltpda_specwin_viewer_build_window', 'Freq-domain'}, ...
0100 'Position',[120 Gprops.Gheight-140 100 25]);
0101
0102
0103
0104 M = 0.01;
0105 ax = axes('Position', [0.5+M 0.2 0.4 0.7], ...
0106 'Parent', mainfig, ...
0107 'Tag', 'LTPDA_specwin_viewer_axes', ...
0108 'Visible', 'on', ...
0109 'Box', 'on');
0110
0111 setappdata(mainfig, 'axes', ax);
0112
0113 sth = uicontrol(mainfig,'Style','text',...
0114 'String','None',...
0115 'BackgroundColor', Gprops.Gcol, ...
0116 'Tag', 'LTPDA_specwin_viewer_wininfo', ...
0117 'Position',[10 10 300 Gproperties.Gheight/2 - 20], ...
0118 'FontSize', 14, 'ForegroundColor', 'b');
0119
0120
0121 sth = uicontrol(mainfig,'Style','edit',...
0122 'String','',...
0123 'BackgroundColor', 'w', ...
0124 'Tag', 'LTPDA_specwin_viewer_cstr', ...
0125 'Position',[10 10 300 25]);
0126
0127
0128
0129 ltpda_specwin_viewer_wintype(mainfig);
0130
0131
0132 ltpda_specwin_viewer_build_window('Time-domain');
0133
0134
0135
0136
0137
0138
0139
0140 set(mainfig,'Visible','on')
0141
0142
0143
0144
0145
0146 function buildWindowSelectionMenu(mainfig)
0147
0148 Gprops = getappdata(mainfig, 'Gproperties');
0149
0150
0151 wins = specwin('Types');
0152
0153
0154 sth = uicontrol(mainfig,'Style','text',...
0155 'String','Window Type',...
0156 'BackgroundColor', Gprops.Gcol, ...
0157 'Position',[10 Gprops.Gheight-40 80 25]);
0158
0159
0160 pmh = uicontrol(mainfig,'Style','popupmenu',...
0161 'String', [{'Kaiser'} wins],...
0162 'Value', 1, ...
0163 'BackgroundColor', Gprops.Gcol, ...
0164 'Tag', 'LTPDA_specwin_viewer_WinType', ...
0165 'Callback', {'ltpda_specwin_viewer_wintype', mainfig}, ...
0166 'Position',[100 Gprops.Gheight-40 120 25]);
0167
0168 end
0169
0170 end
0171
0172
0173