% load AMath582hw3p1.mat % % width = [4 2 1 1/2 1/4 1/8 1/16 1/32]; % % close all; % % figure; % for j = 1:8 % subplot(1,8,j) % C = squeeze(Sgt_spec3(ceil(j/8),mod(j-1,8)+1,1:2:end,1:2:end)); % [Ts,Ks] = meshgrid(tslide3(1:2:end),ks(end/2+1:2:end/2+16384)); % pcolor(Ts,Ks,C'), shading interp % title([num2str(width(mod(j-1,8)+1))]); % xlabel('sec') % axis([0,9,0,11500]) % daspect([.05,15,1]) % set(gca,'XTick',0:3:9) % if j>1 % set(gca,'YTickLabel',[]) % else % ylabel('Frequency (Hz)') % end % end % % set(gcf,'PaperSize',[10 6],'PaperPosition', [0 0 10 6]) % print -dpng -r300 Figure1_gauss.png % % close all; % % figure; % for j = 9:16 % subplot(1,8,mod(j-1,8)+1) % C = squeeze(Sgt_spec3(ceil(j/8),mod(j-1,8)+1,1:2:end,1:2:end)); % [Ts,Ks] = meshgrid(tslide3(1:2:end),ks(end/2+1:2:end/2+16384)); % pcolor(Ts,Ks,C'), shading interp % title([num2str(width(mod(j-1,8)+1))]); % xlabel('sec') % axis([0,9,0,11500]) % daspect([.05,15,1]) % set(gca,'XTick',0:3:9) % if mod(j-1,8)+1>1 % set(gca,'YTickLabel',[]) % else % ylabel('Frequency (Hz)') % end % end % % set(gcf,'PaperSize',[10 6],'PaperPosition', [0 0 10 6]) % print -dpng -r300 Figure1_pulse.png % % close all; % % figure; % for j = 17:24 % subplot(1,8,mod(j-1,8)+1) % C = squeeze(Sgt_spec3(ceil(j/8),mod(j-1,8)+1,1:2:end,1:2:end)); % [Ts,Ks] = meshgrid(tslide3(1:2:end),ks(end/2+1:2:end/2+16384)); % pcolor(Ts,Ks,C'), shading interp % title([num2str(width(mod(j-1,8)+1))]); % xlabel('sec') % axis([0,9,0,11500]) % daspect([.05,15,1]) % set(gca,'XTick',0:3:9) % if mod(j-1,8)+1>1 % set(gca,'YTickLabel',[]) % else % ylabel('Frequency (Hz)') % end % end % % set(gcf,'PaperSize',[10 6],'PaperPosition', [0 0 10 6]) % print -dpng -r300 Figure1_mxhat.png % % close all; % % figure; % for j = 25:32 % subplot(1,8,mod(j-1,8)+1) % C = squeeze(Sgt_spec3(ceil(j/8),mod(j-1,8)+1,1:2:end,1:2:end)); % [Ts,Ks] = meshgrid(tslide3(1:2:end),ks(end/2+1:2:end/2+16384)); % pcolor(Ts,Ks,C'), shading interp % title([num2str(width(mod(j-1,8)+1))]); % xlabel('sec') % axis([0,9,0,11500]) % daspect([.05,15,1]) % set(gca,'XTick',0:3:9) % if mod(j-1,8)+1>1 % set(gca,'YTickLabel',[]) % else % ylabel('Frequency (Hz)') % end % end % % set(gcf,'PaperSize',[10 6],'PaperPosition', [0 0 10 6]) % print -dpng -r300 Figure1_sinc.png % % close all; t = tslide3; k = 6; figure; g_gauss = exp(-(t-4.5).^2./(2.*width(k).^2)); g_rect = rectpuls(t-4.5,2.*width(k)); g_mxhat = (1-((t-4.5).^2)./(width(k).^2)).*exp(-(t-4.5).^2./(2.*width(k).^2)); g_sinc = 2.*sinc(2./width(k).*(t-4.5)) - sinc(1./width(k).*(t-4.5)); plot(t,g_gauss,'k'), hold on plot(t,g_rect,'b'), plot(t,g_mxhat,'r'), plot(t,g_sinc,'g') axis([3.5, 5.5, -1.15, 1.15]) close all; [Ts1,Ks1] = meshgrid(tslide1,ks(end/2+1:end/2+16384)); [Ts2,Ks2] = meshgrid(tslide2,ks(end/2+1:end/2+16384)); [Ts3,Ks3] = meshgrid(tslide3,ks(end/2+1:end/2+16384)); figure; subplot(1,3,1) title(num2str(tstep1)) C = squeeze(Sgt_spec1(1,7,:,:)); pcolor(Ts1,Ks1,C'), shading interp axis([0,9,0,11500]) daspect([.05,15,1]) ylabel('Frequency (Hz)') set(gca,'XTick',0:3:9) xlabel('sec') subplot(1,3,2) title(num2str(tstep2)) C = squeeze(Sgt_spec2(1,7,:,:)); pcolor(Ts2,Ks2,C'), shading interp axis([0,9,0,11500]) daspect([.05,15,1]) set(gca,'XTick',0:3:9) set(gca,'YTickLabel',[]) xlabel('sec') subplot(1,3,3) title(num2str(tstep3)) C = squeeze(Sgt_spec3(1,7,:,:)); pcolor(Ts3,Ks3,C'), shading interp axis([0,9,0,11500]) daspect([.05,15,1]) set(gca,'XTick',0:3:9) set(gca,'YTickLabel',[]) xlabel('sec') set(gcf,'PaperSize',[6 8],'PaperPosition', [0 0 6 8]) print -dpng -r300 Figure2.png