C Library Functions  - subse1 (3)

NAME

subse1(3f) - [M_datapac:VECTOR_OPERATION] extract the elements of a vector which fall into a user-specified subset (one subset variable)

CONTENTS

Synopsis
Description
Input Arguments
Output Arguments
Examples
Author
Maintainer
License

SYNOPSIS

SUBROUTINE SUBSE1(X,N,D,Dmin,Dmax,Y,Ny)

       REAL(kind=wp) :: D(:), Dmax, Dmin, X(:), Y(:)
       INTEGER       :: N, Ny

DESCRIPTION

This subroutine carries over into Y all observations of the precision precision vector X for which the corresponding elements in the precision precision vector D are inside the closed (inclusive) interval defined by DMIN and DMAX, while not carrying over any observations of X corresponding to elements of D outside of this interval.

the input vector X is itself unaltered; those elements of X to be retained are copied over into the output vector Y.

thus all observations of X which correspond to elements in D which are smaller than DMIN or larger than DMAX are not copied over into Y.

the use of subse1(3f) gives the data analyst the capability to easily extract subsets of the data prior to data analysis on each subset.

INPUT ARGUMENTS

X The vector of (unsorted or sorted) observations.
n The integer number of observations in the vector x.
d The vector which ’defines’ the various possible subsets of x.
dmin The value which defines the lower limit (inclusively) of the particular subset of interest to be retained.
dmax The value which defines the upper limit (inclusively) of the particular subset of interest to be retained.

OUTPUT ARGUMENTS

y the vector containing only those elements of x corresponding to values of the d vector in the interval dmin to dmax (inclusive).
ny the integer number of retained observations copied into the vector y.

EXAMPLES

Sample program:

   program demo_subse1
   use M_datapac, only : subse1
   implicit none
   ! call subse1(x,y)
   end program demo_subse1

Results:

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 subse1 (3) July 22, 2023
Generated by manServer 1.08 from cd914251-b2bd-4f9e-8341-58120845f2eb using man macros.