07-21-2009 06:20 PM
Hi,
I have a string of 14400 numbers going into a text file. How can I put them into a 120x120 matrix and then export the matrix?
Thank you.
Dmitry V
07-21-2009 06:38 PM - edited 07-21-2009 06:40 PM
ok well here is an example hope this helps you:
and than to export it use the write to spreadsheet.vi
07-21-2009 06:40 PM
Try not to sample this big number of numbers in RAM, if it's possible buffer a little part of them in RAM and save them into a file, than you can append all other parts to this one.
But of course you can make a 2D-Array from a 1D Array e.g. using a for-loop.
07-21-2009 06:43 PM - edited 07-21-2009 06:47 PM
dmivor wrote:I have a string of 14400 numbers going into a text file. How can I put them into a 120x120 matrix and then export the matrix?
Please show us what you have?
The string must have some kind of delimiter (tab, space) that tells us where one number ends and the next one begins. You can convert it to a 1D numeric array using "spreadsheet string to array". Simply rehape the resulting 1D array to a 2D array of the desired dimensions.
I don't know what you mean by "export". Witte to a file? Binary? formatted? excel?