LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

creating an array/matrix

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

0 Kudos
Message 1 of 4
(2,641 Views)

ok well here is an example hope this helps you:

 

and than to export it use the write to spreadsheet.vi

Message Edited by Harold Timmis on 07-21-2009 07:40 PM
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 2 of 4
(2,634 Views)

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.

0 Kudos
Message 3 of 4
(2,631 Views)

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?

Message Edited by altenbach on 07-21-2009 04:47 PM
0 Kudos
Message 4 of 4
(2,625 Views)