09-28-2024 02:52 PM
Hi there,
I hope you are all doing well.
I am working on solving a LabVIEW problem and I am currently stuck. I have a string array of four words and a 2D array of characters. I want to search for each word in the 2D array. I have tried to create the logic, but it did not work as expected. Could you please help me with this? Specifically, which string palettes can assist me with this task? Any hints or suggestions would be greatly appreciated.
Below is my code and a screenshot of the task:
09-28-2024 07:26 PM - edited 09-28-2024 07:41 PM
As a first step, I recommend starting with the learning resources listed at the top of the forum.
As a first step, you need to define the problem, for example what is allowed for a word match (rows, columns, diagonals, zigzag, forward, reverse, any neighbor of the current character? etc.)
09-29-2024 02:43 AM
The sequence structure serves as the template for this.
I wire N when I verify the logic without using auto-indexing.
The delay was implemented solely for debugging purposes to slow down the execution of the for loop; nothing more than that.
I can search for the word both vertically and horizontally only.
09-29-2024 11:59 AM - edited 09-29-2024 11:59 AM
@Hassan4488 wrote:
I can search for the word both vertically and horizontally only.
Then you only have 8 4-character strings (4 rows and 4 columns) and if you allow both direction for each, you would have 16. For each words in the list, iterate over these strings and see if the pattern exists.
@Hassan4488 wrote:
I wire N when I verify the logic without using auto-indexing..
But you use autoindexing. and the size is four, so wiring N=4 makes no difference.
10-01-2024 01:01 PM
10-01-2024 01:03 PM
Yes, it is, but what about the word "eat" ??
10-01-2024 01:10 PM
I am done wtih finding the word 'oath', but I'm having difficulty with the word 'eat', which requires iteration in the backward direction in the second row. The letters 't', 'a', and 'e' are present, but I'm struggling to find it correctly.
Below is my code.