[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unidentified subject!
From: |
flatmax |
Subject: |
Re: Unidentified subject! |
Date: |
Mon, 27 Nov 2000 09:53:13 +1100 (EST) |
Are your a's, b's and c's hex numbers ?
Expanding on the below routine for hexnumbers :
%# Open the file and read in all of the hexadecimal numbers
%# 'TEST_FILE below will hold frames of DFT'd data
for i=1:length(test_file)/2048-1
TEST_FILE(i,:)=fft(test_file(i*2048:(i+1)*2048));
end
Matt
On Sun, 26 Nov 2000, Ben Sapp wrote:
> 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: <mailto:address@hidden> 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
> -------------------------------------------------------------
>
-------------------------------------------------------------
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
-------------------------------------------------------------