beamlet3dfig10.m
来自「beamlet变化的工具箱」· M 代码 · 共 103 行
M
103 行
function Beamlet3Dfig10(OpenNewWindow,HaveTitle,LoadData)
% auxillary funcyion: Adj_FastSlantStack
% if you don't have the slant stack package 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
if LoadData
load Beamlet3Dfig10
end
ind=[16 1 16 5;8 1 16 5;8 18 16 5;22 25 16 5];
for k=1:4
subplot(2,2,k);
bl=zeros(32);
ii=ind(k,1);
ss=ind(k,2);
i=ind(k,3);
s=ind(k,4);
bl(ii,ss)=1;
if LoadData
im=vv(:,:,k);
else
im=real(adj_fastslantstack(bl));
end
if s<17
vertices=[0,0,-8;0,16,-8;16,16,-8;16,0,-8;0,0,24;0,16,24;16,16,24;16,0,24;0,0,0;0,16,0;...
16,16,0;16,0,0;0,0,16;0,16,16;16,16,16;16,0,16];
else
vertices=[0,-8,0;0,-8,16;16,-8,16;16,-8,0;0,24,0;0,24,16;16,24,16;16,24,0;0,0,0;0,16,0;...
16,16,0;16,0,0;0,0,16;0,16,16;16,16,16;16,0,16];
end
faces=[1,2,3,4;5,6,7,8;1,2,6,5;3,4,8,7;9,10,11,12;13,14,15,16;9,10,14,13;11,12,16,15];
p=patch('faces',faces,'vertices',vertices,'facecolor','n','EdgeColor','b');
axis image
hold on
if s<17
[x,y]=meshgrid(0:16,0:16);
m=mesh(x,y,(i/2)+(-1.125+s/8)*(8-y),abs(im),'FaceColor','flat','EdgeColor','w');
if (i/2)+(-1.125+s/8)*(-8)>16,
yy=-.01+8-(16-i/2)/(-1.125+s/8);
line([0 16],[yy yy],[16 16],'Color','k');
end
if (i/2)+(-1.125+s/8)*(+8)<0,
yy=-.01+8-(-i/2)/(-1.125+s/8);
line([0 16],[yy yy],[0 0],'Color','k');
end
else
[x,y]=meshgrid(0:16,0:16);
m=mesh(x,(i/2)+(3.125-s/8)*(8-y),y,abs(im),'FaceColor','flat','EdgeColor','w');
mx=max((i/2)+(3.125-s/8)*(8-y));
if mx>16,
yy=-0.1+8-(16-i/2)/(3.125-s/8);
line([0 16],[16 16],[yy yy],'Color','k');
end
mn=min((i/2)+(3.125-s/8)*(8-y));
if mn<0,
yy=-0.1+8-(-i/2)/(3.125-s/8);
line([0 16],[0 0],[yy yy],'Color','k');
end
end
set(gca,'view',[-38,30]);
axis image
colormap summer
if HaveTitle
ttlstr=strcat('b(',num2str(ind(k,1)),',',num2str(ind(k,2)),',',num2str(ind(k,3)),',',num2str(ind(k,4)),')');
title(ttlstr)
end
set(gca,'XTick',[],'YTick',[],'ZTick',[]);
h=xlabel('x');
set(h,'position',get(h,'position')+[5 8 0]);
h=ylabel('y');
set(h,'position',get(h,'position')+[7 9 0]);
zlabel('z')
end
%% 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 + -
显示快捷键?