Navigation

Operators and Keywords

Function List:

C++ API

median.m File Reference


Functions

endif if (nargin< 2) dim
endif if (numel(a) > 0) n
 if (mod(n, 2)==1) retval
endif else error ("median: invalid matrix argument")
 !assert ((median(x)==median(x2)&&median(x)==3.5%!&&median(y)==median(y2)&&median(y)==4%!&&median([x2, 2 *x2])==[3.5, 7]%!&&median([y2, 3 *y2])==[4, 12]))
!error median ()
!error median (1, 2, 3)

Variables

function retval
 k = floor ((n+1) / 2)
endif endfunction!test !x = [1, 2, 3, 4, 5, 6]
 !x2 = x'
 !y = [1, 2, 3, 4, 5, 6, 7]
 !y2 = y'

Function Documentation

!assert ( (median(x)==median(x2)&&median(x)==3.5%!&&median(y)==median(y2)&&median(y)==4%!&&median([x2, 2 *x2])==[3.5, 7]%!&&median([y2, 3 *y2])==[4, 12])   ) 

endif else error ( "median: invalid matrix argument"   ) 

if ( mod(n, 2)  = =1  ) 

endif if ( numel(a)  ,
 
)

endif if (  ) 

!error median ( ,
,
 
)

!error median (  ) 


Variable Documentation

endif endfunction !test !x = [1, 2, 3, 4, 5, 6]

!x2 = x'

!y = [1, 2, 3, 4, 5, 6, 7]

!y2 = y'

k = floor ((n+1) / 2)

else retval

Initial value:

 median (a, dim)

  if (nargin != 1 && nargin != 2)
    print_usage ()