Fourier Transform in Simulink
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
I'm simply trying to add up an arbitrary number of sine waves and output the frequency chart with the blocks below:
![fft.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/256530/fft.png)
the matlab function is to perform the fftshift:
function y = fcn(u)
y = fftshift(u)
size(y)
end
But the output of the array plot doesn't seem to make sense, as I've chosen 10 Hz and 20 Hz within the Sine Wave block:
![Capture.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/256531/Capture.png)
The output of the array plot I would suspect should show peaks at both 10 Hz and 20 Hz, but displays something I'm not quite understanding:
![Capture2.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/256532/Capture2.png)
Does anyone have any suggestions on something I'm simply missing here?
2 Kommentare
Nikhil Sonavane
am 23 Dez. 2019
Can you share your Simulink model so that it is easier for me to reproduce your problem?
Antworten (2)
Ridwan Alam
am 23 Dez. 2019
Change the Samples per frame property on the Sine Wave block:
![Untitled.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/256906/Untitled.png)
0 Kommentare
Nikhil Sonavane
am 26 Dez. 2019
The Matrix Block used isn't giving desired results as the Sum over field is not configured properly. Change the Sum over field to Specified dimension and select the Dimension as 2. For more information execute the following command in MATLAB command window and execute it-
openExample('dsp/TransformTimeDomainDataIntoFrequencyDomainExample')
0 Kommentare
Siehe auch
Kategorien
Mehr zu General Applications finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!