help-octave
[Top][All Lists]
Advanced

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

octave memory allocation problem ?


From: Joao Cardoso
Subject: octave memory allocation problem ?
Date: Wed, 19 Apr 1995 17:40:44 +0200

Hi,

I also notice that problem with "load -ascii". Even if "clear -x" is used, not
all memory is released.
In my case it is critical, as each data file has 3500x120 real valued data, and
I need to have several data files loaded. At each sucessive load/clear I loose
some Mega of memory and swapping starts...

Another problem: as the variables contained in a data file have no relationship
with the file name, and I need to process all data files the same way in a
function, I need to open the data file, scan the variable name, and then
"eval" the found name. E.g.

function standard_processing(file_name)

open file_name
scanf variable_name     # get variable_name as string
close file

load  -ascii file_name
data = eval(variable_name);     # and now I use "data" in the function

...

endfunction

This is inconvenient, but I found no other way. The worse is that the "eval"
prints all the data, even if terminated with a semicolon. This is MUCH inconve
nient.
In Matlab, the "load" returns the data contained in the file, and I only need
to do

data =  load -ascii file_name;  # and with a semicolon no printing is done

Of course, in Octave, with multi-variable data files, this is not possible,
but at least the "eval" should not print the evaluated data. 

Any sugestion?


Thanks,

Joao Cardoso
INESC (Inst. Eng. Syst. and Comp.)
R. Jose Falcao 110
4000 PORTO
PORTUGAL

e-mail: address@hidden
tel:    + 351 2 2094300
fax:    + 351 2 2008487 



reply via email to

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