subse1(3f) - [M_datapac:VECTOR_OPERATION] extract the elements of a vector which fall into a user-specified subset (one subset variable)
Synopsis
Description
Input Arguments
Output Arguments
Examples
Author
Maintainer
License
SUBROUTINE SUBSE1(X,N,D,Dmin,Dmax,Y,Ny)
REAL(kind=wp) :: D(:), Dmax, Dmin, X(:), Y(:) INTEGER :: N, Ny
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.
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.
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.
Sample program:
program demo_subse1 use M_datapac, only : subse1 implicit none ! call subse1(x,y) end program demo_subse1Results:
The original DATAPAC library was written by James Filliben of the Statistical Engineering Division, National Institute of Standards and Technology.
John Urban, 2022.05.31
CC0-1.0
Nemo Release 3.1 | subse1 (3) | February 23, 2025 |