Hi Nicholas,
Instead of this:
// Write each column to file?
for(int i = 0; i< NY; i++)
data->put( dataOut, i, NX );
try the following:
for (int i=0; i<NY; i++) // iterate over rows
{
data->set_cur(i*NX); // set data's current_pointer to start of i'th row
data->put(dataOut,1,NX);// copy 1*NX numbers from dataOut to data; row (Y)
major
}
I haven't digested the rest of your code, but certainly the arguments to put()
are lengths, not indexes.
Good luck,
Sjur K :-)
Hello Sjur---
Many thanks for your response; it is greatly appreciated. I will have
to experiment with my code. Once again, thank you!
Nicholas