next up previous index
Next: V304 Search a Up: CERNLIB Previous: V301 Copy an

V302 Copy a Scattered Vector

Routine ID: V302
Author(s): F. BruyantLibrary: KERNLIB
Submitter: C. LetertreSubmitted: 21.08.1971
Language: Fortran or AssemblerRevised: 16.09.1991

UCOCOP and UDICOP copy the contents of a scattered vector into a new scattered vector.

Structure:

SUBROUTINE subprograms
User Entry Names: UCOCOP, UDICOP

Usage:

    CALL UCOCOP(A,X,IDO,IW,NA,NX)
    CALL UDICOP(A,X,IDO,IW,NA,NX)
extract IDO times IW

consecutive words from A, every NA words, and place them into X, every NX words. Both routines have the same effect if the vectors A and X do not overlap. UCOCOP allows concentration, UDICOP allows dilation of a vector in situ.

For IDO=0 or IW=0 , the routines act as 'do-nothing'.

Examples:

    DIMENSION IA(14),IX(12)
    DATA IA /1,2,3,4, 5,6,7,8, 9,10,11,12, 13,14/
 
    CALL UCOCOP(IA,IX,4,2,4,3)
    CALL UCOCOP(0,IX(3),4,1,0,3)
gives
    IX = 1,2,0, 5,6,0, 9,10,0, 13,14,0

V304


Janne Saarela
Mon Apr 3 15:06:23 METDST 1995