Plotting of a simple sine function in a frequency domain

7 views (last 30 days)
Hello, I need help with plotting of a simple sine or cosine function in a frequency domain. I have tried to look on the net how to do this but without a success. It should be in continuous time. I just want to see the 2 delta functions and I will continue from there. Thanks.
  1 Comment
Image Analyst
Image Analyst on 19 May 2016
I first thought you want a sine wave in the frequency domain, but you don't - your sine wave is in the time or spatial domain. More precise/less ambiguous wording would be "I would like to plot the spectrum, in the frequency domain, of a time domain signal that is a sine or cosine wave in the time domain."

Sign in to comment.

Answers (2)

Star Strider
Star Strider on 18 May 2016
See the R2015a documentation for fft. Everything you need is there.
See specifically the code just above and below the first plot figure.

FAHAD AHMED
FAHAD AHMED on 5 Jul 2021
Plot a sine wave in time domain and transforms this sine wave into frequency domain.

Community Treasure Hunt

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

Start Hunting!