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.*ASO3F1 = 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.9999
ans =
0.9999 0.9999 0.9999
0.9999 0.9999 0.9999
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)