Getting wrong sine wave for frequency 10KHz

18 views (last 30 days)
632541 on 25 May 2021
Answered: Stephan on 25 May 2021
I'm plotting sine wave with frequency 10KHz.
But not getting it as expected.
What is the reason for this?
Code is here
plotted signal

Answers (1)

Stephan on 25 May 2021
Think about your sampling rate:
f = 10000;
t = 0:1/(25*f):0.002;

Community Treasure Hunt

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

Start Hunting!