GNU Octave
4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
liboctave
cruft
odepack
vnorm.f
Go to the documentation of this file.
1
DOUBLE PRECISION
FUNCTION
vnorm
(N, V, W)
2
CLLL. OPTIMIZE
3
C-----------------------------------------------------------------------
4
C THIS FUNCTION ROUTINE COMPUTES THE WEIGHTED ROOT-MEAN-SQUARE NORM
5
C OF THE VECTOR OF LENGTH N CONTAINED IN THE ARRAY V, WITH WEIGHTS
6
C CONTAINED IN THE ARRAY W OF LENGTH N..
7
C VNORM = SQRT( (1/N) * SUM( V(I)*W(I) )**2 )
8
C-----------------------------------------------------------------------
9
INTEGER
N, I
10
DOUBLE PRECISION
V, W, SUM
11
dimension
v(n), w(n)
12
sum = 0.0d0
13
DO
10 i = 1,n
14
10 sum = sum + (v(i)*w(i))**2
15
vnorm
= dsqrt(sum/dble(n))
16
RETURN
17
C----------------------- END OF FUNCTION VNORM -------------------------
18
END
workspace_element::dimension
std::string dimension(void) const
Definition:
workspace-element.h:74
vnorm
double precision function vnorm(N, V, W)
Definition:
vnorm.f:1
Generated on Thu Jun 4 2015 23:30:24 for GNU Octave by
1.8.8