What's the easiest way to create a file of 2d matrices to import in separte sheets?



Hey all,

I'm hoping to use gnumeric to visualize the output of an insect
population model that I'm writing in java. The idea is to run the model,
dump data to a file, import the file to gnumeric and look at the numbers
to evaluate the model as I code it. The question is how to do this with
the least possible effort.

The model describes dynamics so I have repetitions of the same
information for each time step. If the model generates only one line of
data per step, the problem is easy: dump to a file, rows are days.

However, the best way to visually inspect my model is as a two
dimensional space where the y axis is the mass of fat and the x axis is
the mass of protein and the number in each cell is the number of flies
of that mass combination. (Assume bugs are made of water, fat and
non-fat (protein) then ignore the water.) So I'd like to generate a 2D
matrix every step, dump it to a file, then import into gnumeric, ideally
into separate sheets. Then I can quickly scroll through the sheets to
see if the numbers all go to zero or infinity or seem to behave
correclty. (I need to look at them because the model describes seasonal
fluctuations and math errors somewhere can have subtle errors.)

Has anyone done something like this? Is there a simple way to tell
spreadsheets: to put the next n rows in one sheet and then go to the
next? This sounds like what pivot tables do but how does one describe a
pivot table in a flat file? Is the only option to actually generate a
correct xml format spreadsheet file?

Thanks for any help,
adrian

PS One thing that would be really useful even for the simple case is to
create a button that would re-import a text file using the settings
which were just used. Is this going to be really hard to create?




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]