Navigation

Operators and Keywords

Function List:

C++ API

substruct.m File Reference


Functions

 if (nargs > 1 &&mod(nargs, 2)==0) narg_pairs
 switch (t) case
otherwise error ("substruct: expecting type to be one of \"()\", \"{}\", or \".\"")
else print_usage ()
endif endfunction!test !x (1, 1).type
 !x (2, 1).type
 !x (3, 1).type
 !assert (x, y)
!error assert (substruct)
!error assert (substruct(1, 2, 3))
!error assert (substruct("x", 1))
!error assert (substruct("()",[1, 2, 3]))
!error assert (substruct(".",{1, 2, 3}))

Variables

function retval
 typ = cell (narg_pairs, 1)
 sub = cell (narg_pairs, 1)
 k = 1
for i
 dot = false
endswitch s = varargin{i+1}
 !y = substruct ("()", {1,2,3}, "{}", ":", ".", "foo")

Function Documentation

!assert ( ,
 
)

!x ( ,
 
)

!x ( ,
 
)

endif endfunction !test !x ( ,
 
)

!error assert ( substruct(".",{1, 2, 3})   ) 

!error assert ( substruct("()",[1, 2, 3])   ) 

!error assert ( substruct("x", 1)   ) 

!error assert ( substruct(1, 2, 3)   ) 

!error assert ( substruct   ) 

otherwise error ( "substruct: expecting type to be one of \"()\"   ) 

if ( nargs  ,
1 &&  modnargs, 2 = =0 
)

else print_usage (  ) 

switch (  ) 


Variable Documentation

!y = substruct ("()", {1,2,3}, "{}", ":", ".", "foo")

case dot = false

for i

Initial value:

 1:2:nargs
      t = varargin{i}

k = 1

endfor retval

Initial value:

 substruct (varargin)

  nargs = nargin

endswitch s = varargin{i+1}

sub = cell (narg_pairs, 1)

typ = cell (narg_pairs, 1)