1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Matlab: plotting one period of a discrete signal

  1. Mar 26, 2014 #1
    I have a 3 rad/s sine wave that I am sampling every 2 seconds.

    The slow sampling has created an alias of -0.14 rad/s.

    I have plotted this over the top of the original continuous time signal, please see attachment.

    My problem is that I only want to plot the first period of the discrete signal, i.e. end at 44.88 seconds, but I want to plot the original CT signal for the full 60 seconds.

    I'm going around in circles and getting some strange results. Hopefully somebody out there can shed some light.



    Attached Files:

  2. jcsd
  3. Mar 26, 2014 #2


    User Avatar

    Staff: Mentor

    Are you doing this to illustrate aliasing on purpose? What is the context of this work? It seems like you can plot whatever you want -- what is the issue? Sorry if I'm missing the obvious... :smile:
  4. Mar 26, 2014 #3

    I'm in the process of making a GUI that prompts a user for signal frequency, sample time and length.

    If the user enters a sampling rate that is insufficient I want to lay the first cycle of the aliased signal over the original CTsignal to, as you say, illustrate aliasing.

    As you can see from my attachment I have successfully overlaid the aliased signal, but I would like to only display the primary period.
  5. Mar 30, 2014 #4
    I managed to sort my problem out…. sort of.

    I found the time taken to make one revolution

    Circle time= (1/frequency) x 2 x π

    And then made a vector from zero to

    circle time x (1/sampling time)
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted