bowl.m

来自「荷兰Delft大学开发的insar(干涉合成孔径雷达)图像处理部分源代码」· M 代码 · 共 41 行

M
41
字号
function b = bowl(nrows,ncolumns)% BOWL --  Generate unit bowl.%   c = BOWL;        bowl [0,1] of dimensions (512,512);%   c = BOWL(L);     bowl [0,1] of dimensions (L,L);%   c = BOWL([L P]); bowl [0,1] of dimensions (L,P);%   c = BOWL(L,P);   bowl [0,1] of dimensions (L,P);% %   Bowl is generated by exp(r^2) where r is normalized radius.%   Probably a more natural subsidence bowl should be used.%%   See also CONE, PYRAMID, RAMP, SIMINTERF % %// $Revision: 1.1 $  $Date: 2001/09/28 14:24:39 $%// Bert Kampes, 11-Dec-2000%%% Handle input.if     (nargin==2) ;elseif (nargin==1) if (prod(size(nrows))==1) ncolumns=nrows;		   else ncolumns=nrows(2); nrows=nrows(1); end;elseif (nargin==0) nrows=512; ncolumns=nrows;else   error('wrong number of input');end;%%% Cone generation (can lot smarter?)[x,y] = meshgrid(1:ncolumns,1:nrows);x0    = round(size(x,2)/2);%          top of bowly0    = round(size(x,1)/2);%          top of bowlr     = sqrt((x-x0).^2 + (y-y0).^2);%       radiusr     = normalize(r);b     = exp(r.^2);return%%% Normalize [-sqrt(x0):0] --> [0,1]minb  = max(b(:));%minb  = -sqrt((size(x,2)-x0).^2 + (size(x,1)-y0).^2);b     = (b-minb) ./ -minb;%%% EOF

⌨️ 快捷键说明

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