02-14-2015 03:32 AM
Hi all,
I have an 1d array of numbers which ranges from 255 to 0, i want to search for an first element which is less than 100 and retrieve the index.
Can anybody help me how to go about it.
Solved! Go to Solution.
02-14-2015 06:06 AM
kamasani a écrit :
Hi all,
I have an 1d array of numbers which ranges from 255 to 0, i want to search for an first element which is less than 100 and retrieve the index.
Can anybody help me how to go about it.
This is an easy task, what have you tried?
hint: autoindex FOR loop, compare element with 100, if less then stop loop and index of loop is the index of element.
Have you looked at these free introduction class to LabVIEW:
Ben64
02-14-2015 07:01 AM
Hi kamasani,
You can use for loop to do this program.
I hope it's helpful for you.
Tunnel mode -> Conditional. It means if TRUE will build ARRAY.
So input array size is not equal to output array size.
For example, Input array is [0 200 50 150]. Only 0 and 50 less than 100.
Output Array is [0 2].(Index of Array)
02-14-2015 07:41 AM - edited 02-14-2015 07:42 AM
Hi Ben64,
Thanks for the hint, it worked out.
I need a little more help to do the following:
I want to repeat this for all the column indeces attached to the post.
Please suggest me how to go about it.
02-14-2015 09:20 AM
Use the same ideas. Throw one column into the array at a time. Search. Repeat.
The most "complex" part of this program is interfacing with the excel spreadsheet.
02-15-2015 06:06 PM
02-15-2015 09:33 PM
Hi all,
Thanks for you replies,
I have a 2d array of size, 3969 X 600. I need to extract 1000 columns at once and search for an element less than 100 for each columns.
The 2d array size varies for different images. So as the number of columns.
I need your suggestions folks,
02-15-2015 09:46 PM
Take the Array. Subtract 100. Do a comparison Less than Zero.
Iterate through the array row by row. Do AND Array Elements to find a row where every column is Less than 0.
01-24-2019 12:54 PM
Whoa! There are tutorials online? I had no idea! If only people would reference them more often!
01-24-2019 02:26 PM
@stevenette wrote:
Whoa! There are tutorials online? I had no idea! If only people would reference them more often!
Was even true in early 2015 ... 😄