LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Delete all the consonants from a given string

Solved!
Go to solution

guys, can anyone help me to make a VI to search and delete all the consonants from any given string..

0 Kudos
Message 1 of 12
(3,854 Views)

What have you tried? Where did you get stuck?

0 Kudos
Message 2 of 12
(3,848 Views)

All I did is to search the string with vowels. then i dont know what to do..

0 Kudos
Message 3 of 12
(3,839 Views)
  • You can insert images into a post. No need to attach it.
  • Do you have a problem with the algorithm in general or just with LabVIEW?
  • Have you taken any course or tutorial?
  • You code has nothing to do with vowels, right? What was your thought process so far?
  • (your image below)

Filter%20String

0 Kudos
Message 4 of 12
(3,821 Views)

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.

 

0 Kudos
Message 5 of 12
(3,813 Views)

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.

0 Kudos
Message 6 of 12
(3,800 Views)

@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.

0 Kudos
Message 7 of 12
(3,791 Views)

@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. 😄

 

0 Kudos
Message 8 of 12
(3,785 Views)
Solution
Accepted by topic author badshahsatya

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.

 

NoVow.png

 

 

Message 9 of 12
(3,777 Views)

thanks for the support altenbach

0 Kudos
Message 10 of 12
(3,739 Views)