📄 fft_small_tb.m
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Altera FFT MegaCore Function Version 2.1.0% file : fft_small_tb.m%% Description : The following Matlab testbench excercises the Altera FFT Model fft_small_model.m% generated by Altera's FFT Megacore and outputs results to text files.%% Copyright (C) 1988-2004 Altera Corporation % Parameterization Space N=16384;% Read input complex vector from source text files fidr = fopen('real_input.txt','r'); fidi = fopen('imag_input.txt','r'); xreali=fscanf(fidr,'%d'); ximagi=fscanf(fidi,'%d'); fclose(fidi); fclose(fidr); % Create input complex row vector from source text files x = xreali' + j*ximagi'; [y, exp_out] = fft_small_model(x,N,0); fidro = fopen('real_output_c_model.txt','w'); fidio = fopen('imag_output_c_model.txt','w'); fideo = fopen('exponent_out_c_model.txt','w'); fprintf(fidro,'%d\n',real(y)); fprintf(fidio,'%d\n',imag(y)); fprintf(fideo,'%d\n',exp_out); fclose(fidro); fclose(fidio); fclose(fideo);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -