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

📄 createmember.m

📁 这是一个关于MATLAB的函数
💻 M
字号:
function nn = createmember(memb,name,sobj)
% Private.
%ADDMEMBER - add a member to structure class
%  ADDMEMBER(ST,NAME,HANDLE)- appends the specifed member to
%  the 'ST' structure class.  NAME is used to identify the
%  member, which is used to specify an entry in the member
%  structure of ST.  
%
%  See Also READ, WRITE, DELMEMBER.

% 
%   Copyright 2002 The MathWorks, Inc.
%   $Revision: 1.2 $ $Date: 2002/03/26 14:13:19 $

% Limited to the following handle types:
%  numeric, string, ....
%
error(nargchk(3,3,nargin));

if ~ischar(name),
    error('member NAME must be a string');
elseif name(1) == '_',
    warning(['Member: ' name ' does not start with an alphanumeric characters.  Q was added to the member name']);
    name = ['Q' name];
    ismangled = true;  % Eventually this should be noted in class
end

if ~ishandle(sobj),
    error('New members must be defined with an UDD object class');
end

membname    = fieldnames(memb.containerobj_membinfo);
memb.(name) = sobj;

% [EOF] createmember.m

⌨️ 快捷键说明

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