GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
dinvwt.f
Go to the documentation of this file.
1 C Work performed under the auspices of the U.S. Department of Energy
2 C by Lawrence Livermore National Laboratory under contract number
3 C W-7405-Eng-48.
4 C
5  SUBROUTINE dinvwt(NEQ,WT,IER)
6 C
7 C***BEGIN PROLOGUE DINVWT
8 C***REFER TO DDASPK
9 C***ROUTINES CALLED (NONE)
10 C***DATE WRITTEN 950125 (YYMMDD)
11 C***END PROLOGUE DINVWT
12 C-----------------------------------------------------------------------
13 C This subroutine checks the error weight vector WT, of length NEQ,
14 C for components that are .le. 0, and if none are found, it
15 C inverts the WT(I) in place. This replaces division operations
16 C with multiplications in all norm evaluations.
17 C IER is returned as 0 if all WT(I) were found positive,
18 C and the first I with WT(I) .le. 0.0 otherwise.
19 C-----------------------------------------------------------------------
20 C
21  IMPLICIT DOUBLE PRECISION(a-h,o-z)
22  dimension wt(*)
23 C
24  DO 10 i = 1,neq
25  IF (wt(i) .LE. 0.0d0) GO TO 30
26  10 CONTINUE
27  DO 20 i = 1,neq
28  20 wt(i) = 1.0d0/wt(i)
29  ier = 0
30  RETURN
31 C
32  30 ier = i
33  RETURN
34 C
35 C------END OF SUBROUTINE DINVWT-----------------------------------------
36  END
OCTAVE_EXPORT octave_value_list etc The functions then dimension(columns)