help-octave
[Top][All Lists]
Advanced

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

Re: Very slow reading of a 2D matirx


From: Mike Miller
Subject: Re: Very slow reading of a 2D matirx
Date: Thu, 20 Oct 2005 21:39:20 -0500 (CDT)

On Thu, 20 Oct 2005, Henry F. Mollet wrote:

Thanks for clarification. Can you please elaborate about the difference of reading data from a data file compared to using a script. Thanks.


Suppose I were to write a script that would load a big matrix into memory. I could write a one line script like this:

load big_matrix.dat

But then big_matrix.dat would have to be in my default directory. If I wrote it like this:

load /path/to/files/big_matrix.dat

Then the user would have to store the matrix in a certain place. I can't think of an easy way to ensure that the data is stored where the script can find it. Any ideas? Maybe it could use "which" to find out where the script was located, then look for the file in the same place, but I don't quite no how to write such a script.

It would be nice if I could write the script like this...

big_matrix = [ 2 1 3
4 5 6
...
7 8 9];

...and have it read in without having to find the data file. See what I mean? Maybe someone has an elegant way of finding a file or of associating a file with a script. That would be nice.

I need to be able to do this kind of thing myself, so I'm genuinely very interested in seeing other ideas.

Mike



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]