[Index for tmp_for_tar/vrml.doc]
[Return to Master Index]
rmfield
(tmp_for_tar/vrml.doc/rmfield.m)
Function Synopsis
t = rmfield(s,...)
Help text
t = rmfield(s,key1,...)
Removes key1, key2, ... from structure s.
Return s if s is not a struct. Any better behavior?
For m****b compatibility and flexibility.
Basically, does a 'filtering' copy of s.
See also cmpstruct, fields, setfield, isstruct, getfield, isfield,
catstruct and struct.
Last modified: January 2000
Cross-Reference Information
This function calls
- index tmp_for_tar/vrml.doc/index.m
Listing of function file tmp_for_tar/vrml.doc/rmfield.m
## t = rmfield(s,key1,...)
##
## Removes key1, key2, ... from structure s.
## Return s if s is not a struct. Any better behavior?
##
## For m****b compatibility and flexibility.
##
## Basically, does a 'filtering' copy of s.
##
## See also cmpstruct, fields, setfield, isstruct, getfield, isfield,
## catstruct and struct.
##
## Author: Etienne Grossmann <etienne@isr.ist.utl.pt>
## Last modified: January 2000
function t = rmfield(s,...)
if ! is_struct(s) ,
t = s ;
return
end
va_start() ;
rmf = ' ' ;
nargin-- ;
while nargin-- ,
tmp = va_arg() ;
if ! isstr(tmp) ,
printf('struct: called with non-string key\n') ;
tmp
keyboard
else
rmf = [rmf,tmp,' '] ;
end
end
for [val, key] = s ,
if ! index(rmf,[' ',key,' ']) , % Check if key is wanted
eval(['t.',key,'=val;']) ; % Copy
end
end
Produced by oct2html on Sat Dec 2 19:08:39 2000
Cross-Directory links are: ON