MATLAB Answers

Fourier Transform in Simulink

3 views (last 30 days)
Zjuv9021
Zjuv9021 on 20 Dec 2019
Answered: Nikhil Sonavane on 26 Dec 2019
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
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
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
Does anyone have any suggestions on something I'm simply missing here?

  2 Comments

Nikhil Sonavane
Nikhil Sonavane on 23 Dec 2019
Can you share your Simulink model so that it is easier for me to reproduce your problem?

Sign in to comment.

Answers (2)

Ridwan Alam
Ridwan Alam on 23 Dec 2019

  0 Comments

Sign in to comment.


Nikhil Sonavane
Nikhil Sonavane on 26 Dec 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 Comments

Sign in to comment.

Sign in to answer this question.