clearobject.m

来自「matlab处理图像的一些基本方法。其中有一部分mex程序需要安装编译」· M 代码 · 共 36 行

M
36 行
字号
function clearobject(pos)%CLEAROBJECT Clear the objects inside the rect%  Clearobject - clears buttons in the variable button frame%  pos is a vectors of 4 numbers that defines the area in which%  delete the uicontrols%% Copyright (c) 1995 by Claudio Rivetti and Mark Young% claudio@alice.uoregon.edu,    mark@alice.uoregon.edu%global Handlefigj = get(Handlefig,'Children');% get returns a vector of handles to the children - get the size of the vectors into k(2)% k(1) contains the number of rows == the number of childrenk = size(j);% Perform a search of the children, get each child's position, and delete any children within% the buttonframefor i=1:k(1);	childpos = get(j(i),'Position');	childtype=get(j(i),'Type');	if strcmp(get(j(i),'Type'),'uimenu') ~= 1		if childpos(1) > pos(1) & childpos(2) > pos(2)			delete(j(i));		end	endend return;

⌨️ 快捷键说明

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