[Index for tmp_for_tar/struct]
[Return to Master Index]
substruct
(tmp_for_tar/struct/substruct.m)
Function Synopsis
v = substruct(s,...)
Help text
t = substruct (s, key1, key2 ...) =
Returns a struct t with fields "key1" ... and values s.key1 ...
See also cmpstruct, fields, setfield, rmfield, isfield, isstruct,
struct.
Listing of function file tmp_for_tar/struct/substruct.m
## t = substruct (s, key1, key2 ...) =
##
## Returns a struct t with fields "key1" ... and values s.key1 ...
##
## See also cmpstruct, fields, setfield, rmfield, isfield, isstruct,
## struct.
## Author: Etienne Grossmann <etienne@isr.ist.utl.pt>
function v = substruct(s,...)
if nargin<=1, return ; end
tmp = "";
while --nargin,
k = va_arg() ;
tmp = [tmp,"v.",k,"=s.",k,"; "] ;
end
eval(tmp);
Produced by oct2html on Wed Aug 8 19:47:02 2001
Cross-Directory links are: ON