# VecWhichBetween
Creates an index set containing the indices where  VecLow < V < VecHigh 
## Synopsis
```
#include "petscvec.h"  
PetscErrorCode VecWhichBetween(Vec VecLow, Vec V, Vec VecHigh, IS *S)
```
Collective on S


## Input Parameters

- ***VecLow -*** lower bound
- ***V -*** Vector to compare
- ***VecHigh -*** higher bound



## OutputParameter

- ***S -*** The index set containing the indices i where veclow[i] < v[i] < vechigh[i]



## Notes
The vectors must have the same parallel layout

For complex numbers this only compares the real part



## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/vec/utils/projection.c.html#VecWhichBetween">src/vec/vec/utils/projection.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/vec/utils/projection.c)


[Index of all Vec routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
