MATLAB Answers


can someone please help about NCO HDL optimized block. How to generate a simple sine wave with it. I am gettting a single straight line as output for what ever phase increment i use. can someone help how to set sampling frequency as well

iam always getting something like this but not a sine waveScreenshot (25).png


Sign in to comment.

1 Answer

Answer by Bharath Venkataraman on 26 Mar 2019
Edited by Bharath Venkataraman on 10 Apr 2019
 Accepted Answer

Attached is a simple NCO which generates a sine wave. Phase increment is set to 4 and accumulator size is 8 bits, so you will see a full period in 2^8/4 = 64 steps.


Are you using the model I attached above - nco_simple.slx?
I am able to run this model in R2018b without issues. Can you attach the model you are using and which version of MATLAB you are running?

Sign in to comment.