Home
Community
Discussion Forums
Most Active Software Boards
LabVIEW
Topic
LabVIEW
Register
·
Login
·
Help
Community
Category
Board
Documents
Users
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Search instead for
Did you mean:
Topic Options
Subscribe to RSS Feed
Mark Topic as New
Mark Topic as Read
Float this Topic for Current User
Bookmark
Subscribe
Mute
Printer Friendly Page
All Forum Topics
Previous Topic
Next Topic
How do I count the number of 1's in a Boolean Array??
How do I count the number of 1's in a Boolean Array??
Ross@UL
Member
08-01-2001
09:39 AM
Options
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
Report to a Moderator
I have a boolean array of 1000 0's or 1's and want to know the number of times this array is in the 1 position.
The array is repeated within a structure and i need a number for each iteration to be passed onto the next (using a shift register).
Never really used boolean arrays before so none of the standard things i use seem to work?
Thanks in Advance.
Ross
1
Kudo
Message
1
of 4
(10,303 Views)
Reply
Re: How do I count the number of 1's in a Boolean Array??
BruceAmmons
Trusted Enthusiast
08-01-2001
09:43 AM
Options
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
Report to a Moderator
Ross,
The quick easy way is to convert the boolean array to a 0-1 array from the boolean menu, then sum the array using "sum array elements" from the numerical menu.
Bruce
Bruce Ammons
Ammons Engineering
4
Kudos
Message
2
of 4
(10,303 Views)
Reply
Re: How do I count the number of 1's in a Boolean Array??
Ross@UL
Member
Author
08-01-2001
09:55 AM
Options
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
Report to a Moderator
Ceers Bruce, works a treat.
Ross
0
Kudos
Message
3
of 4
(10,303 Views)
Reply
Re: How do I count the number of 1's in a Boolean Array??
Ross@UL
Member
Author
08-01-2001
09:56 AM
Options
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
Report to a Moderator
Cheers Bruce, works a treat.
Ross
0
Kudos
Message
4
of 4
(10,303 Views)
Reply
All Forum Topics
Previous Topic
Next Topic