www.gusucode.com > mbc 工具箱 matlab 源码程序 > mbc/@xregpointer/null.m

    function p= null(p,varargin)
%NULL sets pointer to null (0).
%
% PTR = NULL( Q );  sets all elements of q to null
% PTR = NULL( Q, DIM ); creates an xregpointer array of dimensions specified in dim

%  Copyright 2000-2005 The MathWorks, Inc. and Ford Global Technologies, Inc.

if nargin==1
    p.ptr(:)= 0;
else
    p.ptr= zeros(varargin{:});
end