From help-octave-request at bevo dot che dot wisc dot edu Sun Nov 26 16:35:57 2000 Subject: Re: Unidentified subject! From: Ben Sapp To: Abhra Haldar cc: help-octave at bevo dot che dot wisc dot edu Date: Sun, 26 Nov 2000 15:35:54 -0700 I am not sure I understand exactly what you are trying to do. Do you mean that you want to treat each byte as a new point in time? Then really each byte is not a character but a value from 0-255. Then you want to take 2048 of these points and take the fft of this sample? I made a dummy file called test_file that had a-z all in lower case. I was able to read these characters in and take the fft like so: ## open the data file test_file = fopen("test_file","r+"); ## 26 should be changed to 2048 in your case [val, count ] = fscanf(test_file,"%s",26); ## get the ascii values of the characters data = toascii(val); ## take the fft fft(data); I hope this is in the ballpark of what you are looking for. -- Ben Sapp Los Alamos National Laboratory email: Phone: (505)667-3277 Fax: (505)665-7920 URL: http://www.neutrino.lanl.gov/ -- On Sun, 26 Nov 2000, Abhra Haldar wrote: > > I have a file made up of thousands of characters a's, b's, c's d's. I need > to know how to open this file, divide it into chunks of 2048 characters, > and take the Fast Fourier Transform of each of these segments. Can > anyone help? > >Thanks > ------------------------------------------------------------- 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 -------------------------------------------------------------