⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 arect..txt

📁 "arect" displays a 3-D plot of a pattern."makepattern" computes values of an array pattern cover fun
💻 TXT
字号:
% "arect" displays a 3-D plot of a pattern.
function arect(pat, uvw, fig)
% pat: [m, n] array of pattern values
% uvw: [3, m, n] corresponding direction vectors
% where m and n are the
height
% and width of the array of
% pattern values. Each
column
% is a triple of coordinates
% [u,v,w].
% fig (optional): figure number
if nargin < 3
fig = 1;
end
s = size(uvw); s = s([2 3]);
figure(fig);
u = reshape(uvw(1,:), s);
v = reshape(uvw(2,:), s);
surfl(u, v, max(-10, 10*log10(max(pat,realmin))));
zl = [-10, 5*ceil(2*log10(max(max(pat))))];
set(gca, 'Zlim', zl);
shading('interp');
colormap(gray(64));
//////////////////////////////////////////////////////////////////////////
% "makepattern" computes values of an array pattern; cover function for
% apattern
function pat = makepattern(x, on, ph, i, uvw)
% x [<number of elements>, 3]: element locations (units of
% lambda)
% on [<number of elements>, npop]: "on" values (boolean) for
% population (return from
% athin)
% ph [<number of elements>, npop]: phase values for population
% (return from athin)
% i: index of individual
% uvw [3, <number of directions>]: points on unit sphere
(direction
% vectors) at which to sample
% pattern
% Returns
% pat [1, <number of directions>]:
% array of pattern values
% Alternatively, <number of directions> may be replaced with a list
% of two (or more) dimension, which then become the shape of the
% result.
pat = apattern([x(on(:,i),:), ph(on(:,i),i)], uvw);

⌨️ 快捷键说明

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