f_block.m

来自「digital signal processing常用工具箱」· M 代码 · 共 26 行

M
26
字号
function f_block (x,y,wide,high,color)

%F_BLOCK: Draw a block using the current axes
%
% Usage: f_block (x,y,wide,high,color)
%
% Inputs: 
%         x     = x coordinate of lower left corner
%         y     = y coordinate of lower left corner
%         wide  = width of block
%         high  = height of block
%         color = optional 1 by 3 color vector
%
% Note: Used by chapter GUI modules

% Draw block

x0 = [x x+wide x+wide x x];
y0 = [y y y+high y+high y];
if (nargin < 5)
   plot (x0,y0,'k')
else
   plot (x0,y0,'Color',color)
end

⌨️ 快捷键说明

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