comparison inst/mean2.m @ 222:79ff7c116059

Minor changes in help text
author hauberg
date Thu, 04 Jan 2007 23:46:17 +0000
parents 13c6a9bdec24
children 8fe38c1c25c5
comparison
equal deleted inserted replaced
221:19e7d0a052f4 222:79ff7c116059
14 ## along with this program; if not, write to the Free Software 14 ## along with this program; if not, write to the Free Software
15 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 15 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 16
17 ## -*- texinfo -*- 17 ## -*- texinfo -*-
18 ## @deftypefn {Function File} @var{m}= mean2 (@var{I}) 18 ## @deftypefn {Function File} @var{m}= mean2 (@var{I})
19 ## returns the mean value for a 2d real type matrix. 19 ## Returns the mean value for a 2d real type matrix.
20 ## Uses @code{mean(I(:))} 20 ## Uses @code{mean(I(:))}
21 ## @seealso{std2,mean}
21 ## @end deftypefn 22 ## @end deftypefn
22 ## @seealso{std2,mean}
23 23
24 24
25 ## Author: Kai Habel <kai.habel@gmx.de> 25 ## Author: Kai Habel <kai.habel@gmx.de>
26 ## Date: 01/08/2000 26 ## Date: 01/08/2000
27 27
28 function m = mean2 (I) 28 function m = mean2 (I)
29 29
30 if !(nargin == 1) 30 if !(nargin == 1)
31 usage ("mean2(I)"); 31 print_usage();
32 endif 32 endif
33 33
34 if !(is_matrix(I) && isreal(I)) 34 if !(is_matrix(I) && isreal(I))
35 error("argument must be a real type matrix"); 35 error("mean2: argument must be a real type matrix");
36 endif 36 endif
37 37
38 m = mean (I(:)); 38 m = mean (I(:));
39 endfunction 39 endfunction