fist time answering a question, so i will just copy it down here :P
i did not read through the whole code, but i think i found an error:
length(y) = 0:1/fs:70000;
the command 0:1/fs:70000 basically gives you a vector with the initial value 0 that increments by 1/fs until it reaches 70000 (thus a vector of length fs*70000 = 573440001) and you are trying to put this into a single position in the vector "length".
i believe you are trying to do the following:
y = 0:1/fs:70000
length_y = length(y) % or size(y,2) if your pc also runs out of memory at this call
are you sure the signal is 70000 seconds long?? thats 70000/3600 = 19.44 hours!!
your code for plotting the frequency spectrum seems a little wierd.. if it doesnt work, take a look at this code:
Fs = 8192; L = length(your_signal); NFFT = 2^nextpow2(L);
f = Fs/2*linspace(0,1,NFFT/2+1); spectrum = fft(your_signal,NFFT)/L;
you can also you plot() instead of semilog if you don't like the semilogarithmic plot
- hope this helps