next up previous contents index
Next: Interface histogram Up: Module linearalgebra_module Previous: Interface find_in_array   Contents   Index

Interface rms_diff


\begin{boxedminipage}{\textwidth}
\begin{verbatim}r1 = rms_diff(vector1,vector2)
r2 = rms_diff(array1,array2)\end{verbatim}
\end{boxedminipage}

Root-mean-square difference calculation for components of two vectors or arrays. For two vectors of $N$ dimensions, this is calculated as

\begin{displaymath}
\sum_{i=1}^{N} \left(\mathbf{v_1}_i - \mathbf{v_2}_i\right)^2
\end{displaymath}

For two arrays of dimension $N \times M$, this is calculated as

\begin{displaymath}
\sum_{j=1}^{M} \sum_{i=1}^{N} \left(\mathbf{a_1}_{ij} - \mathbf{a_2}_{ij}\right)^2
\end{displaymath}

vector1, vector2 -- real(dp), intent(in), dimension(:)

array1, array2 -- real(dp), intent(in), dimension(:,:)

Return value -- real(dp)
histogram interface

gabor 2009-06-30