08-25-2011 06:28 PM
I have a simple problem.
I have a 2D array of string type. The array is a table with column names, and rows which are numbers.
I want to extract the rows, but I want them to come out as numbers so I can do some line fitting to them.
Do I need to select each element and convert from string to number?
Is there a function that converts a string (pink line) to a number (orange line)?
Is there a smarter way?
Solved! Go to Solution.
08-25-2011 06:35 PM
Try this...
on the blockdiagram right click go to programming-->strings-->string/numberconversion-->fract/exp stringtonumber
Thanks
Robin
08-25-2011 07:08 PM
Thanks. Your solution works but element-wise.
But is there a VI that applies to the whole 2D array to change its type?
08-25-2011 08:33 PM
Spreadsheet String to Array in the String palette.
Lynn
08-25-2011 08:40 PM
Put the 2D array through a For loop. See attached.
08-25-2011 08:59 PM - edited 08-25-2011 09:01 PM
@murchak wrote:
Thanks. Your solution works but element-wise.
But is there a VI that applies to the whole 2D array to change its type?
??
It works on an entire array at a time in my version of LabVIEW!
08-26-2011 10:08 AM
It does indeed work on an entire array. Thanks!!