drdrawfig03.m

来自「beamlet变化的工具箱」· M 代码 · 共 101 行

M
101
字号
function dRDrawFig03(OpenNewWindow,HaveTitle,LoadData)

% if you don't want to process it, set LoadData=1
% DrawFig3 -- Draw Figure showing the definitions of lines in frequency space corresponding to pseudopolar angles .

if nargin<3
    LoadData=0;
end

if nargin<2
    HaveTitle=1;
end

if nargin<1
    OpenNewWindow=1;
end

if OpenNewWindow
    figure
end


n = 8;
w = zeros(2,n+1,n);
xi = zeros(2,2,n+1,n);
Total = n^2+1;
for s=1:2,
	first = 3-s;
	secnd = s;
	if s==1, sg = 1; else sg= -1; end
	for l=1:(n+1),
		for m=1:n,
			lt = l-1 -n/2;
			mt = m-1 -n/2;
			if lt==0,
				w(s,l,m) = 1/(2*n);
			elseif abs(lt) < n/2,
				w(s,l,m) = 2*abs(lt)/n;
			elseif abs(mt) < n/2,
				w(s,l,m) = 1/2;
			else
				w(s,l,m) = 1/4;
			end
			xi(first,s,l,m) = 2*pi*lt/n;
			xi(secnd,s,l,m) = sg*2*pi*mt/n * lt*2/n;
		end
	end
end
%
% Display lines indicating plot extent

%figure
%
plot([-pi, pi,pi,-pi,-pi],[-pi, -pi,pi,pi,-pi],'-'); hold;
ch = ':-';
col='rb';
for s=1:2, 
	pch = [ch(s) col(s)]; 
	for m=1:n, 
		plot(xi(1,s,(n+1),m),xi(2,s,(n+1),m),'x'); 
		plot(reshape(xi(1,s,[1 (n+1)],m),2,1),reshape(xi(2,s,[1 (n+1)],m),2,1),pch); 
	end ; 
end
hold off; 
axis off;axis square

%black and white

%figure
%
%plot([-pi, pi,pi,-pi,-pi],[-pi, -pi,pi,pi,-pi],'-k'); hold;
%ch = ':-';
%col='kk';
%for s=1:2, 
%	pch = [ch(s) col(s)]; 
%	for m=1:n, 
%		plot(xi(1,s,(n+1),m),xi(2,s,(n+1),m),'xk'); 
%		plot(reshape(xi(1,s,[1 (n+1)],m),2,1),reshape(xi(2,s,[1 (n+1)],m),2,1),pch); 
%	end ; 
%end
%hold off; 
%axis square
%axis off

%print -depsc RawFig3.eps
% Copyright (c) 2002 Ana Georgina Flesia
%% Part of BeamLab Version:200% Built:Friday,23-Aug-2002 00:00:00% This is Copyrighted Material% For Copying permissions see COPYING.m% Comments? e-mail beamlab@stat.stanford.edu%%% Part of BeamLab Version:200% Built:Saturday,14-Sep-2002 00:00:00% This is Copyrighted Material% For Copying permissions see COPYING.m% Comments? e-mail beamlab@stat.stanford.edu%

⌨️ 快捷键说明

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