S1Fun.mean edit page

Calculates the mean value of a SO3Fun or calculates the mean along a specified dimension of a vector-valued SO3Fun

Description

If SO3F is a 3x3 SO3Fun then mean(SO3F) returns a 3x3 matrix with the mean values of each function mean(SO3F, 1) returns a 1x3 SO3Fun which contains the pointwise mean values along the first dimension

Syntax

value = mean(SO3F)
SO3F = mean(SO3F, d)

Input

SO3F SO3Fun
d dimension to take the mean value over

Output

SO3F SO3Fun
value double

Example

%generate SO3Funs
SO3F1 = SO3Fun.dubna
SO3F2 = SO3FunHandle(@(rot) SO3F1.eval(rot))
A = ones(2,3);
SO3F3 = SO3F2.*A
SO3F1 = SO3FunRBF (Quartz → y↑→x)
 
  multimodal components
  kernel: de la Vallee Poussin, halfwidth 5°
  center: 19848 orientations, resolution: 5°
  weight: 1
 
 
SO3F2 = SO3FunHandle (y↓→x → y↓→x)
  eval: @(rot)SO3F1.eval(rot)
 
 
SO3F3 = SO3FunHandle (y↓→x → y↓→x)
  size: 2 x 3
  eval: @(rot)reshape(SO3F1,[1,size(SO3F1)]).*reshape(SO3F2.eval(rot),[numel(rot),size(SO3F2)])
%calculate mean values of SO3Funs
mean(SO3F2)
mean(SO3F3)
mean(SO3F3,2)
mean(SO3F3,1)
ans =
    0.9998
ans =
    0.9998    0.9998    0.9998
    0.9998    0.9998    0.9998
 
ans = SO3FunHandle (y↓→x → y↓→x)
  size: 2 x 1
  eval: @(rot)mean(SO3F.eval(rot),varargin{1}+1)
 
 
ans = SO3FunHandle (y↓→x → y↓→x)
  size: 1 x 3
  eval: @(rot)mean(SO3F.eval(rot),varargin{1}+1)

Citing this page. This page is part of the documentation of MTEX, a free and open source MATLAB toolbox for analyzing and modeling crystallographic textures. It was written by The MTEX Developers and is published at https://mtex-toolbox.github.io/S1Fun.mean.html. If you use MTEX, or reuse text or figures from this page, in your research, please cite

F. Bachmann, R. Hielscher, H. Schaeben: Texture Analysis with MTEX - Free and Open Source Software Toolbox, Solid State Phenomena 160 (2010), 63-68. 10.4028/www.scientific.net/SSP.160.63

BibTeX
@article{bachmann2010mtex,
  author  = {F. Bachmann and R. Hielscher and H. Schaeben},
  title   = {Texture Analysis with MTEX - Free and Open Source Software Toolbox},
  journal = {Solid State Phenomena},
  volume  = {160},
  pages   = {63-68},
  year    = {2010},
  doi     = {10.4028/www.scientific.net/SSP.160.63},
  url     = {https://doi.org/10.4028/www.scientific.net/SSP.160.63}
}

Other papers describing specific MTEX methods are listed under Publications — please cite the one that best fits your application. The MTEX source code is licensed under the GNU General Public License v2.0; the text and figures of this documentation are licensed under CC BY 4.0, which permits reuse — including by automated systems — provided The MTEX Developers and this page are credited.