04-06-2014 08:23 PM - edited 04-06-2014 08:24 PM
Perhaps I am over complicating this, but the solution evades me.....
I have a mix of numeric types (lengths) that I want to display in a table together.
is there an easy method to do a "convert to string" on a 2d array that displays all differing lengths of numbers?
If I use Fractional convert on the array I end up with numbers all being the same length, see below.
eg. How I want it displayed: (note the varying lengths of numerics)
Applied Volts |
Frequency |
Duration |
Range |
0.018 |
50 |
5 |
0.04 |
0.1 |
50 |
5 |
0.4 |
0.45 |
50 |
5 |
1 |
1.8 |
1000 |
10 |
4 |
45 |
10000 |
10 |
100 |
Not how I want it: ( all at 3 dec places)
Applied Volts |
Frequency |
Duration |
Range |
0.018 |
50.000 |
5.000 |
0.040 |
0.100 |
50.000 |
5.000 |
0.400 |
0.450 |
50.000 |
5.000 |
1.000 |
1.800 |
1000.000 |
10.000 |
4.000 |
45.000 |
10000.000 |
10.000 |
100.000 |
04-06-2014 08:27 PM
How do you define which cells have which formats? Is the numeric data in an array or does it come from multiple sources?
Lynn
04-06-2014 08:58 PM - edited 04-06-2014 09:04 PM
My routine reads in all those values in the table from a CSV file and converts them to numbers to control the instrumentation and perform calcs.
Just dawned on me that I could grab the raw string data as soon as I have read it from the CSV and push it straight to the table.
However, I am still curious if there is an easy way to represent varying length numerics in a table together. Ie I don't want set a length of 2, 4, or 6 etc, I just want the total number of digits shown in the table.
04-07-2014 01:47 AM - edited 04-07-2014 01:48 AM
Hi Adam,
it's all in the LabVIEW help: read about those different string formatting codes!
I would try something like "%#.6f" to get rid of trailing zeros…