资源简介
用matlab实现角普法再现数字全息图。
代码片段和文件信息
function varargout = ASP( U1zdxy1lambdavarargin )
%ASP Diffraction calculation by Angular Spectrum Propagation method
% Syntax:
% [U2dxy2] = ASP(U1zdxy1‘PropertyName‘‘PropertyValue‘...)
% [U2...] = ASP(U1zdxy1...)
% ASP(U1zdxy1...)
%
% U1 is the wavefront of the object plane
% U2 is the wavefront of the diffraction plane
% U1 and U2 are all two-dimensional array
% size of U1 and U2 are even
% z is the distance between object plane and diffraction plane
% dxy1 is the sampling distance of the object dxy1=[dx1dy1]
% lambda is the wavelength of the laser
%
% if there is no output image on diffraction plane will be displayed
% else no image will be displayed
%
% the origin of coordinates is at M/2+1N/2+1
%
%--------------------------------------------------------------------------
% PropertyName and PropertyValue:
%
% piz {off} | t
% pad the input array with zeros
% off - do not pad
% t - paste U1 to an all zeros array whose size is t*size(U1)
%
% iiz {off} | t
% interpolate the input array with zeros
% off - do not interpolate
% t - interpolate t-1 points between every two points
%
% pfz {off} | t
% pad the frequency array with zeros
% off - do not pad
% t - paste the frequency array(F) to an all zeros array whose
% size is t*size(F)
%
% FTmethod {fourier} | bFSNf0
% which method to be use to realize the fourier transform
% fourier - traditional fourier transform using single fft
% bFSNf0 - FAFS using 3 ffts bFSNf0 are the parameters needed
%
% IFTmethod {invfourier} | bSSNxy0
% which method to be use to realize the inverse fourier transform
% invfourier - traditional inverse fourier transform using single fft
% bSSNxy0 - IFASS using 3 ffts bSSNxy0 are the parameters needed
%--------------------------------------------------------------------------
error(nargchk(414nargin))
if nargout>2
error(‘Too many output arguments‘)
end
for n=1:length(varargin)
if ~ischar(varargin{n})
error(‘Property names and values must be characters‘)
end
end
% ----------------------construct the property array----------------------
parray=[00000]; % initialize the property array the property array
% is used to store the property specified by the user
freepv={‘1‘‘1‘‘1‘‘‘‘‘}; % initialize the free property value array free property
% values do not fall into those values in the property structure
property=struct(‘name‘{‘piz‘‘iiz‘‘pfz‘‘FTmethod‘‘IFTmethod‘}); % construct the property structure
property(1).value={‘off‘‘‘}; % which stores all possib
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2012-07-13 08:55 角谱法再现程序\
文件 5455 2007-08-03 15:27 角谱法再现程序\ASP.m
文件 6858 2012-07-13 09:55 角谱法再现程序\doublewave0813.asv
文件 6796 2012-07-13 08:52 角谱法再现程序\doublewave0813.m
文件 2974 2006-10-16 09:41 角谱法再现程序\FAFS.m
文件 1611 2006-08-12 15:02 角谱法再现程序\fourier.m
文件 3005 2006-10-16 16:51 角谱法再现程序\IFASS.m
文件 1655 2006-08-12 14:52 角谱法再现程序\invfourier.m
文件 58 2011-05-24 15:02 角谱法再现程序\Readme.txt
评论
共有 条评论