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

📄 bowl.m

📁 InSAR工具箱
💻 M
字号:
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -