08-14-2008 05:37 PM
I am collecting 2D array of DBLs to be later processed by other Vis.
The process worked fine when I saved the array to a file (standard %.3f, write to spreadsheet) formatting, then later have a separate VI to open the file and process it.
The same process did not work when I tried to process the 2D array on the fly, without saving/opening to file.
After debugging, I found out what was holding me back. Yep you guessed it, the formatting. Without save to spreadsheet, instead of “0.000”, the value is not 2.803E-42 (I need to to be 0.000). What is the most efficient way to format the numbers to “.3f”, on the fly (without saving to file)?
Best,
Santiago
08-14-2008 05:40 PM
08-14-2008 10:12 PM
.3f is the same as a precision of 3 input to the number to fractional string vi (which can handle arrays automatically)
To keep only a precision of 3 you can also do it numerically by multiplying by 1000, rounding then dividing by 1000.
Here is a screenshot of the code using the two different methods. The numeric method should be fastest.