dsp.fft system object unbounded in a for loop

1 回表示 (過去 30 日間)
Joshua Ford
Joshua Ford 2022 年 2 月 21 日
回答済み: Kiran Kintali 2022 年 9 月 7 日
I have matrix if size 256x1024, I would like to do the fft across each row and put it back into the matrix. Previously this has worked for the basic fft function, but I want to use the dsp.fft system object for a fixed-point fft. When using this method an error appears stating the system object does not support unbounded objects. However I have specified the size of the target matrix and have used methods such as assert and code.varargin.
Any help would be great. I have included my code below
%Normal fft method that works
NoPulses = 256
for i = 1:NoPulses
fftRSignal(i,:) = fft(RSignal(i,:))
end
%dsp.fft system object method that doesn't work
coder.varsize('RSignal',[256 1024]);
NoPulses = 256
fftRSignal = complex(zeros(NoPulses, length(RSignal)))
ft = dsp.FFT
for i = 1:NoPulses
assert(i <= NoPulses)
fftRSignal(i,:) = ft(RSignal(i,:))
end

回答 (1 件)

Kiran Kintali
Kiran Kintali 2022 年 9 月 7 日
The functions fft() and dsp.fft() do not support HDL streaming interface.
You can consider using dsphdl.fft or build a custom FFT using MATLAB (attached).

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by