bayes_dipole_trial
PURPOSE
function [m,deviations] = bayes_dipole(a,v,sigma_v,sigma_m)
SYNOPSIS
function [m,deviations] = bayes_dipole_trial(a,v,sigma_v,sigma_m)
DESCRIPTION
CROSS-REFERENCE INFORMATION
This function calls:
This function is called by:
SOURCE CODE
0001 function [m,deviations] = bayes_dipole_trial(a,v,sigma_v,sigma_m)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 if ~(nargin == 4)
0018 error('improper parameter list')
0019 end;
0020
0021
0022 ls_mat = a'*a + ((sigma_v/sigma_m)^2 * eye(size(a,2)));
0023
0024 inv_ls_mat = inv(ls_mat);
0025 lv_mat = a'*v;
0026
0027 m = inv_ls_mat*lv_mat;
0028
0029 error = a*m - v;
0030
0031 deviations(1,:) = sqrt(sum(error.^2)/size(error,1));
0032
0033 deviations(2,:) = sqrt(sum(m.^2)/size(m,1));
Generated on Wed 20-Sep-2023 04:00:50 by m2html © 2003