Home > SPlaC v1_0 > Mie > GEN > GenCheckSumMatVec.m

GenCheckSumMatVec

PURPOSE ^

Check potential loss of precision during product of a matrix by a vector

SYNOPSIS ^

function sumret=GenCheckSumMatVec(mat,vec,sVar,sCaller)

DESCRIPTION ^

 Check potential loss of precision during product of a matrix by  a vector
 See the supplementary information for a discussion of loss of precision.
 Returns the product of the matrix by the vector (mat * vec).
 A warning is issued if numerical problems are encountered
 (see GenCheckSumNumPb for more details).
 No check is performed if the global variable noCheckSum is defined
 and equal to true.

 Parameters:
 - mat: matrix [B x A]
 - vec: column vector [A x 1]
 - sVar: string describing the variable that is being calculated
 - sCaller: string describing the function in which the calculation is
            performed

 Returns: mat * vec

 This file is part of the SPlaC v1.0 package (copyright 2008)
 Check the README file for further information

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 sumret=mat*vec; % [B x 1]
0002 
0003 global noCheckSum;
0004 if (isempty(noCheckSum) || ~noCheckSum)
0005     nNbRow=size(mat,1);
0006     summax=max(abs(mat.*repmat(transpose(vec),nNbRow,1)),[],2);
0007     GenCheckSumNumPb(sumret,summax,sVar,sCaller);
0008 end

This web page is part of the SPlaC package © 2008. Contact: Eric Le Ru
Generated on Wed 03-Dec-2008 11:10:14 by m2html © 2003 (adapted)