05-20-2020 12:34 PM
I have an array of U8 values and a string array of the pattern I want to search for:
The string array has 5 values and the U8 array many. I want to compare the 5 string array values against the first 5 Array u8 values (starting at index 0) if not found I want to compare the 5 string array values with 5 of the Array u8 values (starting at index 1) if not found then again compare the next 5 values of the Array u8 (index 2) etc........any help will be appreciated !
Solved! Go to Solution.
05-20-2020 12:59 PM
05-20-2020 01:30 PM
Thank You! Didn't know about Compare Aggregates.
02-09-2024 05:28 AM
Hello,
I'm trying to detect in 2-D Array the pattern of six followings 1 ( "111111").
If the pattern is detected in first column then my code should copy two columns ( 2 x 18) to the new subarray ( for further processing) and start the searching process again.
I'm trying to compare two arrays but it seems that something doesn't work.
How to restart the searching process: in next portion of data will be searched next pattern of "111111"
All new subarrays should be pushed out of loop for other calculations.
Thank You
Tom
02-12-2024 02:26 AM
Hi Altenbach,
I'm a beginer with labview.
I'm trying to create the code as on Your post but it seems that I'm still missing some settings.
Could You take a look on my code and give me some hints.
In the meantime I'm trying to extend this code for 2-D Array: if subarray is detected in first column then starting from the index of first the following 18 rows is taken to subarray.
Could You support me little bit with this?
Best regards
Tomasz
Labview 2020 / 32 bits
02-12-2024 10:16 AM
Here is a slight Modification of your code.
I did not touch the looplength. It is just an Idea.
Hope it helps.
02-12-2024 11:27 AM
Hi Nottilie,
Could You compile attachment to LV version 2020 32 bit or insert screnshot, please?
I have LV 2020 and it results an error:
Thank You
Tomasz
02-12-2024 07:23 PM - edited 02-13-2024 03:57 AM
@Tom_wolf wrote:I'm trying to create the code as on Your post but it seems that I'm still missing some settings.
Labview 2020 / 32 bits
I have not posted in this thread and I am not sure why you are asking me specifically. If you were trying to modify one of my programs, please give a link to the original discussion.
It is also not a good idea to append to a thread that is already marked as solved. The original discussion talks about an U8 array, but you have an I32 array, which is a quite different problem.
I think we should stick with solving the 2D array problem. Do you just want to find the first match or all matches? How should the output look like? Why is the "Pattern a 2D array if we are only interested in a 1D pattern? All your control terminals belong before the loop, of course.
When attaching code it also really helps if the controls contain typical default values. Empty arrays are probably not typical.
02-12-2024 07:25 PM - edited 02-12-2024 07:26 PM
@nottilie wrote:
Here is a slight Modification of your code..
(code in LabVIEW 2024 that most don't have. Make sure to use "save for previous" before attaching)
It is a really (really!) bad idea to attach modified code with the same filename as something that has been posted earlier. You need to give it a new name!
02-12-2024 07:55 PM - edited 02-12-2024 07:57 PM