C Library Functions  - move (3)

NAME

move(3f) - [M_datapac:VECTOR_OPERATION] move selected elements of one vector into another vector

CONTENTS

Synopsis
Description
Input Arguments
Output Arguments
Examples
Author
Maintainer
License

SYNOPSIS

SUBROUTINE MOVE(X,M,Ix1,Iy1,Y)

       REAL(kind=wp),intent(in)  :: X(:)
       INTEGER,intent(in)        :: M
       INTEGER,intent(in)        :: Ix1
       INTEGER,intent(in)        :: Iy1
       REAL(kind=wp),intent(out) :: Y(:)

DESCRIPTION

MOVE(3f) moves (copies) M elements of the REAL vector X (starting with position Ix1) into the REAL vector Y (starting with position Iy1).

This allows the data analyst to take any subvector in X and place it anywhere in the vector Y.

INPUT ARGUMENTS

X The vector of observations, part (or all) of which is to be moved (copied) over into the vector Y. The input vector X remains unaltered.
M The integer number of elements in the vector X to be moved.
IX1 The integer value which defines the position in the vector X of the first element to be moved.
IY1 The integer value which defines the position in the vector Y where the first element to be moved will be placed.

OUTPUT ARGUMENTS

Y The vector into which the copied data values from the vector X will be sequentially placed, starting in position IY1 of Y. The m elements in positions

                 IY1, IY1+1, ... , IY1+M-1

will be identical to the M elements in the X vector IN positions

                 IX1, IX1+1, ... , IX1+M-1.

EXAMPLES

Sample program:

   program demo_move
   use M_datapac, only : move, label
   real,allocatable :: x(:), y(:)
      call label(’move’)
      x=[10.0,20.0,30.0,40.0,50.0,60.0,70.0,80.0,90.0,100.0,110.0,120.0]
      if(allocated(y))deallocate(y)
      allocate(y(size(x)))
      y=99.0
      call MOVE(X,4,5,1,Y)
      write(*,*)int(y)
   end program demo_move

AUTHOR

The original DATAPAC library was written by James Filliben of the Statistical Engineering Division, National Institute of Standards and Technology.

MAINTAINER

John Urban, 2022.05.31

LICENSE

CC0-1.0


Nemo Release 3.1 move (3) July 22, 2023
Generated by manServer 1.08 from 99be1933-bcb1-4cc7-b53f-c11fcd6d53b4 using man macros.