OpenCores
URL https://opencores.org/ocsvn/dblclockfft/dblclockfft/trunk

Subversion Repositories dblclockfft

[/] [dblclockfft/] [trunk/] [bench/] [cpp/] [fft_tb.m] - Diff between revs 14 and 26

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 14 Rev 26
% Read the file
% Read the file
fid = fopen('fft_tb.dbl','r');
fid = fopen('fft_tb.dbl','r');
raw = fread(fid, [2 inf], 'double');
raw = fread(fid, [2 inf], 'double');
fclose(fid);
fclose(fid);
 
 
% Convert the raw doubles into complex values
% Convert the raw doubles into complex values
datc = raw(1,:)+j*raw(2,:);
datc = raw(1,:)+j*raw(2,:);
% Reshape the matrix into one line per FFT
% Reshape the matrix into one line per FFT
% Assume an FFT length of 2048
% Assume an FFT length of 2048
ftlen = 2048;
ftlen = 2048;
ndat = reshape(datc, ftlen, length(datc)/ftlen);
% ftlen = 128;
 
ndat = reshape(datc, ftlen*2, length(datc)/(ftlen*2));
 
 
 
truth  = ndat((ftlen+1):(2*ftlen), :);
 
output = ndat(1:ftlen,:);
 
 
% Create a time axis, for use in plotting if desired
% Create a time axis, for use in plotting if desired
tm = 0:(ftlen-1);
tm = 0:(ftlen-1);
 
 
% Now, the data from the test is ready for inspection
% Now, the data from the test is ready for inspection
 
 
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.