drdrawfig32.m
来自「beamlet变化的工具箱」· M 代码 · 共 88 行
M
88 行
function dRDrawFig32(OpenNewWindow,HaveTitle,LoadData)
%In the first row, we have easy-to-make figures of
%Lincoln, Lincoln with zeros appended, Lincoln sheared by theta degrees
% if you don't want to process it, set LoadData=1
if nargin<3
LoadData=0;
end
if nargin<2
HaveTitle=1;
end
if nargin<1
OpenNewWindow=1;
end
if OpenNewWindow
figure
end
subplot(1,4,1);
subplot(1,4,2);
subplot(1,4,3);
subplot(1,4,4);
%In the first row, we have easy-to-make figures of
%Lincoln, Lincoln with zeros appended, Lincoln sheared by theta degrees
LoadData=0;
n1 = 64;
n2 = 128;
theta =23*pi/180;
%
Img = ReadImage('Lincoln');
BigImg = zeros(n2,n1);
BigImg((n1+1 - (n1/2)):(n1+ n1/2),:) = Img;
%
Shift = zeros(n2,n1);
%
% Build matrices of Difference
for i=1:n1,
vshift = Shift1dSignal(BigImg(:,i),(i-n1/2-1).*sin(theta));
ExactShift(:,i) = real(vshift(:));
end
%
%figure;
subplot(1,4,1);
imagesc(Img);axis image;set (gca,'XTick',[]);
set (gca,'YTick',[]);
subplot(1,4,2)
imagesc(BigImg);
axis image;set (gca,'XTick',[]);
set (gca,'YTick',[]);
subplot(1,4,3);
imagesc(ExactShift);
axis image;set (gca,'XTick',[]);
set (gca,'YTick',[]);
%then we compute the row sums of the last image, getting 2n numbers
%and plot them as function y=y(x) (vertically-driven curve) in the final panel.
S=sum(ExactShift,2);
x=1:length(S);
subplot(1,4,4)
plot(S,x,'k','LineWidth',2);
ylim([0,128]);axis off;set (gca,'XTick',[]);
set (gca,'YTick',[]);
set(gca,'PlotBoxAspectRatio',[1 2 1]);
% 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 + -
显示快捷键?