help-octave
[Top][All Lists]
Advanced

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

memory exhausted


From: Fulko van Westrenen
Subject: memory exhausted
Date: Wed, 18 Feb 1998 18:19:09 +0100 (CET)

Hello,

I made a quick-and-dirty function-file to do some filtering using fft.
The datafile contains 2318x2 points (the measured variable and time)
When I try to filter I get 
error: memory exhausted -- trying to return to prompt

Octave is 2.0.10 (the pre-compiled for Linux)
Debian Linux 1.3.1-6
486DX2 with 20MB ram and 64MB swap
Octave occupies over 48MB when the error occurs

Do I make a stupid mistake (likely) or is there a serious problem?

Thanks,
Fulko
-------
f.m:

function [retval] = f(data,freq);

hrv=data(:,2);
hrv=welch(hrv);
a=rows(data);
hrv=fft(hrv);
b=1/(a*5);
c=fix(freq/b)+1;
v=zeros(a)';
v(1:c)=1;
v(a-c+1,a)=1;
hrv=hrv.*v;
hrv=abs(ifft(hrv));
data(:,2)=hrv;
retval=data;
endfunction

-----
welch.m
 
function [retval] = welch(A);
  A=A(:);
  a = size(A,1);
  H = [1:a]';
  for j=1:a
    H(j) = 1-(((j-1)-0.5*(a-1))/(0.5*(a+1)))**2;
  endfor
  retval=A.*H;
endfunction
-- 
Fulko van Westrenen

email: address@hidden
homepage: http://www.wtm.tudelft.nl/sectie/vk/fulko/home.htm
PGP key: finger address@hidden



reply via email to

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