11-26-2008 09:36 AM
Hi
how can i change a 2D array into a 1D array??
for example, i have a measurement which save the data in a 2D array. each measurement get his own column in this file and the rows are fix, because the measuremntes have the same data length. Now i will change the 2 D array into a 1D array, so that the readout from this file is serial, means column by column.
is this possible?
file example
xxxxxxxxxx meassurement 1
yyyyyyyyyy measurement 2
zzzzzzzz measurement 3
readout: zzzzzzz yyyyyyyy xxxxxxxx
THX
11-26-2008 10:12 AM - edited 11-26-2008 10:14 AM
Take a look at this.
Do you really want the output to be the reverse order of the array? If so, add a Reverse 1-D array to the end.

What happened to the measurement 1, measurement 2, ... data in your example?
11-26-2008 10:58 AM
Hi THX vor the answer
here is an example of my code. the input is a 2D array.
ok if i can readout this file, i will use the 2D array, but i don't know how i can readout a 2d array-file, i have only experience with 1d arrays.
The problem is, that i have to readout the file data by data.
THX
11-26-2008 10:58 AM
11-26-2008 11:15 AM
so i need exactly a kind of this read-file -process
at first i have a look to the filsize
then i read the file out step by step (in one steps) in a while loop with a kind og marker
if i on the end of the file, i close the file.
but the output from this file is a 32 bit vektor not a array, so i have to change the 2 D Array into a bit vektor with the right order/sequence of data output
THX for help
11-27-2008 02:59 AM
Hi thank you, i think i have it..it was realy a good help from you!!
THX a lot