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.
Vector element to scalar comparison
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13323
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Vector element to scalar comparison
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.
This will return a vector whose elements are 1 if the corresponding element is greater than the scalar and 0, otherwise.
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13323
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Vector element to scalar comparison
Many thanks!
Who is online
Users browsing this forum: No registered users and 36 guests