Home > Objects > @iData > mean.m

# iFit/mean

## PURPOSE

b = mean(s, dim) : mean value of iData object

## SYNOPSIS

function b = mean(a, dim)

## DESCRIPTION

``` b = mean(s, dim) : mean value of iData object

@iData/mean function to compute the mean value of objects
mean(a,dim) averages along axis of rank dim. The axis is then removed.
If dim=0, mean is done on all axes and the total is returned as a scalar value.
mean(a,1) accumulates on first dimension (columns)
mean(a,-dim) averages on all axes except the dimension specified, i.e.
the result is the mean projection of a along dimension dim.
All other axes are removed.

input:  a: object or array (iData/array of)
dim: dimension to average (int)
output: s: mean of elements (iData/scalar)
ex:     c=mean(a);

Version: Nov. 26, 2018

## CROSS-REFERENCE INFORMATION

This function calls:
• camproj s = camproj(a,dim) : projection/radial integration of iData objects elements
• combine c = combine(a,b) : combines iData objects
• copyobj b = copyobj(s) : makes a copy of iData object
• end b = end(s,index,n) : end value for iData objects
• getalias [link, label,names] = getalias(s, 'AliasName') : get iData alias
• getaxis [val, lab] = getaxis(s, AxisIndex) : get iData axis value and label
• label b = label(s, alias, label) : Change iData label for a given alias/axis
• mean b = mean(s, dim) : mean value of iData object
• ndims d = ndims(s) : get the dimensionality of iData object
• rmaxis s = rmaxis(s, Axis) : delete iData axes
• setalias [s,...] = setalias(s, AliasName, AliasLink, {AliasLabel}) : set iData aliases
• setaxis s = setaxis(s, rank, alias, value) : set iData axes
• size size(s) : get iData object size (number of elements)
• zeros s = zeros(s,N,M,P,...) : initialize an iData array
This function is called by:
• colon b = colon(s) : vector of arrays
• conv c = conv(a,b) : computes the convolution of iData objects
• convn c = convn(a,b) : computes the convolution of an iData object with a response function
• cwt b = cwt(s,dim,scales,wname,'wname',...) : Continuous wavelet transform
• deconv c = deconv(a,b) : computes the deconvolution of iData objects
• disp disp(s) : display iData object (details)
• fft c = fft(a) : computes the Discrete Fourier transform of iData objects
• help c = help(s) : display iData information as a Dialogue window
• imroi imroi: define a region of interest on a data set
• linspace v = linspace(a,b,n) : creates a linearly spaced vector of objects
• logspace v = logspace(a,b,n) : creates a logarithmically spaced vector of objects
• mean b = mean(s, dim) : mean value of iData object
• pca [b] = pca(X, k) : Principal component analysis of iData object(s)
• std [half_width, center] = std(s, dim) : standard deviation of iData
• subsasgn b = subsasgn(a,index,b) : iData indexed assignement

Generated on Mon 26-Nov-2018 15:08:42 by m2html © 2005. iFit (c) E.Farhi/ILL EUPL 1.1