09-27-2014 10:50 AM
string to array
Solved! Go to Solution.
09-27-2014 10:52 AM
string to array
09-27-2014 10:53 AM - edited 09-27-2014 10:57 AM
Hi nouman,
what have you tried so far?
Did you use StringSubset? In a loop to get parts of your input string? That would be the most forward approach…
Here's a different approach:
P.S.: no need to post twice when you can edit your own message!
09-27-2014 11:02 AM
yeah i tried string subset in a loop but i didnt got my desired results.
the thing i am trying is that the first two characters of string to be placed at index 0 of array the next two on index 1 and so on.
09-27-2014 11:19 AM
09-27-2014 11:28 AM
thanx both of them works for me one converts in a row second one in a column
09-27-2014 11:33 AM
They actually give the exact same result. I don't know what you mean by a row vs. a column. They both give 1-D arrays. Whether it looks like a row or a column is just a function of how you drag out the array indicator to show multiple elements.
09-27-2014 12:08 PM
string 1,2,3,4 are of 32 bits each and i want them to convert them into a 4*4 matrix but i am only getting the first row not a 4*4 matrix at the end. what am i doing wrong.?
09-27-2014 12:11 PM
Attach your code as a VI with your data saved as default in the strings.
It seems wierd that you are doing a conversion from binary to hex.
If you want a 4x4 array, then reshape array should use 4 as a constant rather than a 2.
09-27-2014 12:24 PM
i want two characters at 1*1 position of matrix so first reshape array is used to make a array having two characters at every index. i am getting an array having 2 characters at every index after for loop then i want to convert it into a 4*4 matrix but i am getting only first row.