Page 1 of 1
Vector element to scalar comparison
Posted: Sun Nov 08, 2020 10:53 am
by pka
Hello,
I am looking for a function that compares each element of a given vector to a scalar and returns a vector of 1s and 0s based on the outcome.
Thanks.
Re: Vector element to scalar comparison
Posted: Sun Nov 08, 2020 1:45 pm
by EViews Gareth
What sort of comparison?
Re: Vector element to scalar comparison
Posted: Mon Nov 09, 2020 11:24 am
by pka
I would like to compare if each element of a vector is greater than a given scalar.
This will return a vector whose elements are 1 if the corresponding element is greater than the scalar and 0, otherwise.
Re: Vector element to scalar comparison
Posted: Mon Nov 09, 2020 11:53 am
by EViews Gareth
Re: Vector element to scalar comparison
Posted: Mon Nov 09, 2020 2:41 pm
by pka
Many thanks!