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

Subversion Repositories dblclockfft

[/] [dblclockfft/] [trunk/] [bench/] [cpp/] [fft_tb.m] - Blame information for rev 28

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 14 dgisselq
% Read the file
2
fid = fopen('fft_tb.dbl','r');
3 28 dgisselq
ftlen = fread(fid, 1, 'int32');
4 14 dgisselq
raw = fread(fid, [2 inf], 'double');
5
fclose(fid);
6
 
7
% Convert the raw doubles into complex values
8
datc = raw(1,:)+j*raw(2,:);
9
% Reshape the matrix into one line per FFT
10 28 dgisselq
ndat = reshape(datc, ftlen*2, floor(length(datc)/(ftlen*2)));
11 14 dgisselq
 
12 26 dgisselq
truth  = ndat((ftlen+1):(2*ftlen), :);
13
output = ndat(1:ftlen,:);
14
 
15 14 dgisselq
% Create a time axis, for use in plotting if desired
16
tm = 0:(ftlen-1);
17
 
18
% Now, the data from the test is ready for inspection
19 28 dgisselq
k = 1; plottst; k
20 14 dgisselq
 

powered by: WebSVN 2.1.0

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