⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aliasing1.m

📁 aliasing in matlab by lrmaster,aliasing in matlab by lrmaster
💻 M
字号:
% A program to demonstrate aliasing caused by samplingclear all; % remove all previous data, etcclose all; % close anw windowsN= 128;   % set the size of the picture[x,y] = meshgrid( 1:N ); % define sample locations% make two signal pictures...% ...One a slowly varying pattern...w1 = 16;pict1 = rem(x,2*w1) < w1;% ...the other more rapidly varyingw2 = 2;pict2 = rem(x,2*w2) < w2;% now make a criss-corss sample gridw3 = 2;pict3 = (rem(x,2*w3 ) < w3) & (rem(y,2*w3 ) < w3);ang = -5.0;dummy = ones(size(pict3));dummy = imrotate(dummy,ang,'bicubic');pict3 = imrotate(pict3,ang,'bicubic');pict3 = pict3.*dummy + ~dummy;clear dummy; % delete the variable we no longer need% make up a big picture as a target to put the others intopict = ones( 2*N,2*N );% place the signal pictures...pict(1:N,1:N) = pict1;pict(N+1:end,N+1:end) = pict2;% ...and the sample grid...[nr,nc] = size(pict3);a = round(N/2);b = a;pict( a:(a+nr-1), b: (b+nc-1) ) = pict( a:(a+nr-1), b: (b+nc-1) ) .* pict3;% then show the resultimshow(pict);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -