04-23-2019 10:34 AM
Hello NI community,
I'm pretty new to LabView, and facing some difficulties in comparing two 1D arrays.
The thing is: I've created an event, which split user's input string into an array. Then I need to compare it to other array called "alphabet" in order to get all the indexes of the same elements in "alphabet" array, so that i could use these indices to retrieve proper Morse code of each letter.
Can I get some tips on how to do such comparison of 2 arrays?
Any help would be appreciated 🙂
Solved! Go to Solution.
04-23-2019 11:40 AM
Depending on the format of your "string2", it may be easy to convert to an array using "spreadsheet string to array". You could then create a variant lookup table for your morse code to alphabet conversion.
04-29-2019 07:02 AM
Hey Masoholic,
I would go for a nested for loop for the search and substitution. On every element of the array you check against every element of the alphabet array. When it matches the morse at the corresponding index is being called.
I have put together a simple code, feel free to use it.
ALSO: alvays put the event source into the event case to ensure proper mechanical action. Also stop case was added so your application now can be stopped.
Cheers!