📄 examp_mixdual.m
字号:
%EXAMP_MIXDUAL How to use MIXDUAL%% This script illustrates how one can produce dual windows% using MIXDUAL%% The example constructs a dual window that is more concentrated in% the time domain by mixing the original Gabor window by one that is% extremely well concentrated. The result is somewhat in the middle% of these two.% % The lower framebound of the mixing Gabor system is horrible,% but this does not carry over to the mixdual.%% FIGURE 1 Mixdual of two Gaussians.%% The first row of the figure shows the canonical dual window% of the input window, which is a Gaussian function perfectly% localized in the time and frequency domains.%% The second row shows the canonical dual window of the window we% will be mixing with: This is a Gaussian that is 10 times more% concentrated in the time domain than in the frequency domain.% The resulting canonical dual window has rapid decay in the time domain.%% The last row shows the mixdual of these two. This is a non-canonical% dual window of the first Gaussian, with decay resembling that of the% second.%% SEE ALSO: MIXDUAL, CANDUAL% This program is free software: you can redistribute it and/or modify% it under the terms of the GNU General Public License as published by% the Free Software Foundation, either version 3 of the License, or% (at your option) any later version.% % This program is distributed in the hope that it will be useful,% but WITHOUT ANY WARRANTY; without even the implied warranty of% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the% GNU General Public License for more details.% % You should have received a copy of the GNU General Public License% along with this program. If not, see <http://www.gnu.org/licenses/>.disp('Type "help examp_mixdual" to see a description of how this example works.');L=120;a=10;M=12;% Compute frequency shift.b=L/M;% Optimally centered Gaussiang1=pgauss(L);% Compute and print framebounds.[A1,B1]=gfbounds(g1,a,M);disp('');disp('Framebounds of initial Gabor system:');A1, B1% Narrow Gaussiang2=pgauss(L,.1);% Compute and print framebounds.[A2,B2]=gfbounds(g2,a,M);disp('');disp('Framebounds of mixing Gabor system:');A2, B2% Create a mixdual. The window gd is a dual window to g1gd=mixdual(g1,g2,a,M);% Compute and print framebounds.[Am,Bm]=gfbounds(gd,a,M);disp('');disp('Framebounds of mixdual Gabor system:');Am, Bm% Create canonical duals, for plotting.gc1=candual(g1,a,M);gc2=candual(g2,a,M);% Standard note on plotting:%% - The windows are all centered around zero, but this% is not visually pleasing, so the window must be% shifted to the middle by an FFTSHIFTfigure(1);subplot(3,2,1);plot(fftshift(gc1));title('Canonical dual window.'); legend('off');subplot(3,2,2);semilogy(abs(fftshift(gc1)));title('Decay of canonical dual window.'); legend('off');subplot(3,2,3);plot(fftshift(gc2));title('Can. dual of mix. window.');legend('off');subplot(3,2,4);semilogy(abs(fftshift(gc2)));title('Decay of can.dual of mix. window.')legend('off');subplot(3,2,5);plot(fftshift(gd));title('Mixdual');legend('off');subplot(3,2,6);semilogy(abs(fftshift(gd)));title('Decay of mixdual');legend('off');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -