Code covered by the BSD License  

Highlights from
Huygens-Fresnel integral approximation, free-form apertures and rough surfaces

image thumbnail

Huygens-Fresnel integral approximation, free-form apertures and rough surfaces

by

 

Simulate wave propagation through free-form apertures, or off rough surfaces.

matrix2Vector(X, Y, Z)
function B = matrix2Vector(X, Y, Z)
% matrix2Vector - reshape three m-by-n matrices to a 3-by-(m*n) vector
%
% B .... grid, [xi;yi;zi] with (m*n) columns
% X/Y/Z .... [m n 3] matrix with x/y/z-coordinates

p.inputParser;
p.addOptional('X', [], @isnumeric);
p.addOptional('Y', [], @isnumeric);
p.addOptional('Z', [], @isnumeric);

p.parse(X, Y, Z);

if ~isempty(p.Results.X)
	B(1,:) = reshape(X, 1, numel(X));
end

if ~isempty(p.Results.Y)
	B(2,:) = reshape(Y, 1, numel(Y));
end

if ~isempty(p.Results.Z)
	B(3,:) = reshape(Z, 1, numel(Z));
end

Contact us