Generating a cosine wave with variable frequency where frequency is an output from a lookup table
I am trying to generate a sine/cosine wave with a variable frequency. Here’s how I did it.
I took a PN sequence generator with samples per frame 3 and converted those three samples in 1 frame to a decimal number by a MATLAB function block and passes it to a lookup table (1-D) as breakup points [0;1;2;3;4;5;6;7] and gave some data [100;200;300;400;500;600;700;800]. This data is given to a MATLAB function block which takes the values of the lookup table and time from clock block and gives me the result cos(2*pi*f*t). Atleast, this is what it looks like. But, when I ran it oscilloscope haven’t shown me any cosine waves rather, it showed me a constant signal of 1 unit.I am trying to generate a sine/cosine wave with a variable frequency. Here’s how I did it.
I took a PN sequence generator with samples per frame 3 and converted those three samples in 1 frame to a decimal number by a MATLAB function block and passes it to a lookup table (1-D) as breakup points [0;1;2;3;4;5;6;7] and gave some data [100;200;300;400;500;600;700;800]. This data is given to a MATLAB function block which takes the values of the lookup table and time from clock block and gives me the result cos(2*pi*f*t). Atleast, this is what it looks like. But, when I ran it oscilloscope haven’t shown me any cosine waves rather, it showed me a constant signal of 1 unit. I am trying to generate a sine/cosine wave with a variable frequency. Here’s how I did it.
I took a PN sequence generator with samples per frame 3 and converted those three samples in 1 frame to a decimal number by a MATLAB function block and passes it to a lookup table (1-D) as breakup points [0;1;2;3;4;5;6;7] and gave some data [100;200;300;400;500;600;700;800]. This data is given to a MATLAB function block which takes the values of the lookup table and time from clock block and gives me the result cos(2*pi*f*t). Atleast, this is what it looks like. But, when I ran it oscilloscope haven’t shown me any cosine waves rather, it showed me a constant signal of 1 unit. communication, matlab function, 5g, spread sprectrum, simulink MATLAB Answers — New Questions