% SineInAperture3Input.m % creates an image of apertured vertical sinusoids in a tilted array % written by YW, 2/2014 % information about the sinusoids clear all close all x=linspace(-pi, pi,100); sf=[3 6 9 12]; % spatial freq in cycles per image % rad=2; % creats a 100*100*length(sf) matrix containing two 2D apertured sinusoids % of different spatial frequncies. for s=1:length(sf) sinewave2D(:,:,s)= MakeSineApertureInputdlg(x,sf(s)); end % initialize the tile matrix by filling it with zeros imgsize=length(x); ntiles=4; sep=30; tilesize=(ntiles*(imgsize+sep))+sep; tilematrix=zeros(tilesize); startpos=sep:sep+imgsize:length(tilematrix)-1; for rtile=1:ntiles for ctile=1:ntiles tilematrix(startpos(rtile):startpos(rtile)+imgsize-1,startpos(ctile):startpos(ctile)+imgsize-1)=sinewave2D(:,:,rtile); end end imagesc(tilematrix); colormap(gray(256)); axis off;