LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

real matrix to a matrix of strings

Hello!
 
I want to connect a matrix which contain real elements with a multicolumn listbox block that only accepts strings elements.
 
How can I do to convert this elements from real to string?
 
Thank you
 
Larson
0 Kudos
Message 1 of 4
(3,447 Views)
You can feed the matrix (2D array) into nested FOR loops, to a "Number to Fractional String". If indexing is enabled on both the input and output of the FOR loops the result will be that one element of the matrix will be converted to a string at a time in the inner FOR loop, appended to a 1D array and when one row of the original array is complete it will be appended to a 2D array in the outer loop. This will progress until all the elements are converted and you will have an array of string of the same dimension as your input array.
 
P.M.
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 4
(3,443 Views)
I might be mistaken but I believe you can simply wire a 2-D array of numbers directly to the Number to String conversion vi and get a 2-D array of strings out of it without the use of nested FOR loops.
Message 3 of 4
(3,438 Views)
Smiley Surprised You sir win a cigar! I guess I hadn't had enough coffee this morning (the coffee maker here WAS actually broken), but the previous poster is correct, the "Number to Fractional String" function is polymorphic and will accept a 2D array of number, producing a equal sized 2D array of string. 
 
Up too late and up too early.
 
P.M.
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 4 of 4
(3,432 Views)