Navigation

Operators and Keywords

Function List:

C++ API

mean.m File Reference


Functions

 if (nargin==1) opt
 elseif (nargin==2) if(ischar(opt1)) opt
 elseif (ischar(opt2)) opt
else error ("mean: expecting opt to be a string")
endif else print_usage ()
endif if (need_dim) t
 if (isempty(t)) dim
endif endif if (dim > ndims(x)) n
endif if (strcmp(opt,"a")) y
 elseif (strcmp(opt,"g")) y
 elseif (strcmp(opt,"h")) y
else error ("mean: option `%s' not recognized", opt)
 !assert (mean(x)==0 &&mean(y)==0 &&mean(z)==[0, 10])
!error mean ()
!error mean (1, 2, 3)

Variables

function y
 need_dim = 1
else dim = opt1
 opt = "a"
else sz = size (x)
 n = sz (dim)
endif endfunction!test !x = -10:10
 !y = x'
 !z = [y, y+10]

Function Documentation

!assert ( mean(x)  = =0 &&mean(y)==0 &&mean(z)==[0,
10]   
)

elseif ( strcmp(opt,"h")   ) 

elseif ( strcmp(opt,"g")   ) 

elseif ( ischar(opt2)   ) 

elseif ( nargin  = =2  ) 

else error ( "mean: option `%s' not recognized"  ,
opt   
)

else error ( "mean: expecting opt to be a string  ) 

endif if ( strcmp(opt,"a")   ) 

endif endif if ( dim  ,
ndims(x)   
)

if ( isempty(t)   ) 

endif if ( need_dim   ) 

if ( nargin  = =1  ) 

!error mean ( ,
,
 
)

!error mean (  ) 

endif else print_usage (  ) 


Variable Documentation

endif endfunction !test !x = -10:10

!y = x'

!z = [y, y+10]

else dim = opt1

n = sz (dim)

need_dim = 1

opt = "a"

else sz = size (x)

Initial value:

 mean (x, opt1, opt2)

  need_dim = 0