mean

Scilab Function
Last update : 25/04/2007

mean - mean (row mean, column mean) of vector/matrix entries

### Calling Sequence

  `y=mean(x)`
  `y=mean(x,'r')`
  `y=mean(x,'c')`

### Parameters

- `x` : real vector or matrix
- `y` : scalar or vector

### Description

For a vector or a matrix `x` , `y=mean(x)` returns in the scalar `y` the mean of all the entries of `x` .

`y=mean(x,'r')` (or, equivalently, `y=mean(x,1)` ) is the rowwise mean. It returns a row vector: `y(j)= mean(x(:,j))`

`y=mean(x,'c')` (or, equivalently, `y=mean(x,2)` ) is the columnwise mean. It returns a column vector: `y(i)= mean(x(i,:))`

### Examples

    A=[1,2,10;7,7.1,7.01];
    mean(A)
    mean(A,'r')
    mean(A,'c')

### See Also

`sum` , `median` , `st_deviation` ,