06-08-2019 12:25 PM
guys, can anyone help me to make a VI to search and delete all the consonants from any given string..
Solved! Go to Solution.
06-08-2019 12:34 PM
What have you tried? Where did you get stuck?
06-08-2019 12:39 PM - edited 06-08-2019 12:42 PM
All I did is to search the string with vowels. then i dont know what to do..
06-08-2019 12:57 PM - edited 06-08-2019 12:59 PM
06-08-2019 01:12 PM - edited 06-08-2019 01:18 PM
i'm completely newbie in LabVIEW. i have just joined in labview coaching just before 2 days.. and what my Plan is as the consonants are more in number, we cant search all the 21 and then delete them as it may take huge scanning time and memory.. so i have decided that i can search the vowels instead and delete them and place the remaining outputs in a result string. and sorry i have posted a wrong image.
06-08-2019 01:30 PM - edited 06-08-2019 01:33 PM
Again, insert images, instead of attaching. Also please crop to only show the interesting part. We really don't care about your task bar and all that whitespace.
Your image still makes no sense whatsoever. It just repeats the same identical operation 5 times as fast as the computer allows. You would get the identical result if you delete the FOR loop. We also don't even know the contents of your controls. Why is the "Search string" terminal inside the loop? Do you really think you can enter new values during the few nanoseconds the loop is executing?
Attach your VI. Make sure the controls have typical default values. Also explain what result you expect. Has your teacher already told you about auto-indexing and shift registers? If so, go over your class notes again.
06-08-2019 01:40 PM
@badshahsatya wrote:
i'm completely newbie in LabVIEW. i have just joined in labview coaching just before 2 days.. and what my Plan is as the consonants are more in number, we cant search all the 21 and then delete them as it may take huge scanning time and memory.. so i have decided that i can search the vowels instead and delete them and place the remaining outputs in a result string. and sorry i have posted a wrong image.
Why do you think it would take "huge scanning time and memory"? Is your original string very long? Computers are fast, and are meant to do things repeatedly. Why would searching for 21 consonants take dramatically longer than 5 vowels? And for a given piece of text, vowels tend to be higher in the list of occurance frequency than consonants. You haven't mentioned anything about other things that are in the string like punctuation marks.
Why do you want to see a string that has no consonants? It will not be very readable. You can actually have a chance to read an understand a string that has no vowels.
06-08-2019 01:53 PM
@badshahsatya wrote:
...we cant search all the 21 and then delete them as it may take huge scanning time and memory..
You seem to have some serious misconceptions. I am sure I could write a VI that removes all consonants from the collective works of Shakespeare in a reasonable amount of time and without running out of memory. 😄
06-08-2019 02:08 PM
Here's a quick draft to give you some vague ideas. Make sure you understand the purpose of every single code element (For example the thingies with the pink triangles, the tunnel with the [], the string array constant, etc.).
First try to implement it verbatim from scratch and see if it does what you think it does, then try to rewrite it to remove consonants instead.
06-08-2019 11:40 PM
thanks for the support altenbach