06-10-2015 10:35 AM
THE MAGIC TEXT INTIALIZED AS ABCD,AND I HAVE TO CREATE 50 RANDOM ELEMENTS FROM THAT TEXT..CAN ANYONE HELP ME
Solved! Go to Solution.
06-10-2015 10:39 AM
FIRST TURN OFF YOUR CAPS LOCK KEY. CAPS LOCK BLOCKS MAGIC.
There, that is better.
Now describe your problem in a way we can understand. What is "magic text"? What do you mean by "ABCD"?
Post some examples of what you have and what you are looking for.
06-10-2015 10:43 AM
If the file does not exist, the Magic Text is initialized to a random sequence of 50 capital letters from the latin characters “ABCD” (e.g., “BDACCCBABADBDABDA...”).
06-10-2015 10:44 AM - edited 06-10-2015 10:44 AM
I want to know how to generate 50 random latin characters.
06-10-2015 10:46 AM - edited 06-10-2015 10:47 AM
Do a search for random number on your functions palette and go from there.
06-10-2015 10:48 AM
Look in your string palette. There are VIs like String Subset and Index String Array you can use to pick a random (random is in the Numeric palette) element from a string. Then just put it in a for loop and loop 50 times to concatenate a random string of your elements.
06-10-2015 10:56 AM
no ,i didnt find solution from your answer ,i dont want random characters,i just want ABCD letters bcddadd.....=50.
06-10-2015 11:01 AM
i dont want to run n=50,i jst want 50 capital letters from abcd
06-10-2015 11:04 AM - edited 06-10-2015 11:05 AM
You should be able to do what you need to do with the information we gave you - IF you are actually trying to solve the issue and not just hoping someone does it for you.
THINK... random number from 1-4 in a loop that executes 50 times... There, I've gotten you started...
06-10-2015 11:05 AM
@balbal207 wrote:
i dont want to run n=50,i jst want 50 capital letters from abcd
Generate a random number from 0 to 3. Then use Array Index to pick your letter (A, B,C, and D stored in an array of strings). Use autoindexing to create an array of strings for your characters. You can then use Concatinate Strings to turn it all into a single string.