[Index for tmp_for_tar/struct] [Return to Master Index]

catstruct

(tmp_for_tar/struct/catstruct.m)


Function Synopsis

t = catstruct(t,...)

Help text

  s = catstruct(s1,s2,...)

 Builds a struct s with all the fields of s1,s2 ...

 See also cmpstruct, fields, setfield, isstruct, getfield, isfield,
 rmfield and struct. 

 Last modified: January 2000



Listing of function file tmp_for_tar/struct/catstruct.m

##  s = catstruct(s1,s2,...)
##
## Builds a struct s with all the fields of s1,s2 ...
##
## See also cmpstruct, fields, setfield, isstruct, getfield, isfield,
## rmfield and struct. 
##

## Author:        Etienne Grossmann  <etienne@isr.ist.utl.pt>
## Last modified: January 2000

function t = catstruct(t,...)

if exist("t")==0,
  return 
end
while --nargin,
  s = va_arg();
  for [val, key] = s ,
    eval(["t.",key,"=val;"]) ;		
  end
end

Produced by oct2html on Wed Aug 8 19:47:02 2001
Cross-Directory links are: ON