What is the output sample rate of the below given code?

Answers (1)

Per the comments, the output sample rate is 4800, but the more important question would be what the upsampling ratio is.
  • The rctFilt object upsamples the input by a factor of sampsPerSym, which is 4.
  • The d2 object upsamples that by a factor of the first argument, which is 2.
Between those two stages you get an upsampling factor of 8, so the output frequency is 8x the input frequency.
The output is then truncated to the same length as the input, which corresponds to 1/8 of the timespan represented by the input.

5 Comments

Thank you so much for the answer. With output sample rate as 4800 , i tried plotting the spectrum for input symbols as 3,1,-1,-3 separately , im getting the correct corresponding frequency deviations with symbols. But when i tried to plot the spectrum in case of random symbols or all the symbols together , im not able to see the correct deviation values. I have attached the spectrum screenshot for ( a) symbol -1 seperately and (b)all the symbols together using random below. How i will be able to correct spectrum for all symbols together ?
  1. In case of all input symbols as 1
2. Taking Input symbols as random
That's a little off-topic from your original question. :)
That said, what's the code for your random symbol generation? If you include your code as code rather than as a screenshot, it makes it a lot easier to assist. You can click on the leftmost icon in the CODE area at the top of the comment box to insert code (or press Alt+Enter); then you can click on the leftmost icon in the TEXT area to move back from code to text (or press Alt+Enter again). Clicking the green arrow in the RUN area, or pressing F5, can evaluate your code directly in the comment window.
The code for the random symbol generation is the same as asked in the original question . For your reference i'm attaching the link from where i have taken the code again.
That looks similar to what I see when I plot the spectrum with plot(20*log10(abs(fftshift(fft(y))))). The peaks are a little clearer when you plot in magnitude than when you plot in dB. Since the signal appears to be using the full spectrum and it's flat across the spectrum, you don't get a very obvious delineation between frequency peaks. I'm fairly sure this is by design, though I'm not specifically familiar with C4FM.
okay , Thank you for your response .

Sign in to comment.

Products

Release

R2023a

Asked:

on 28 Jul 2023

Commented:

on 1 Aug 2023

Community Treasure Hunt

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

Start Hunting!