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!

Fourier analysis in matlab

  1. Feb 19, 2013 #1

    I'm trying to use the fft function in matlab to compute the discrete fourier transform of a box signal. I'm told to assume that the signal x[n] is periodic with period N and the vector contains one period.

    x[n]= box [n]

    I'm am going to use these commands to make my vector



    But I'm asked to justify my choise of N, N1 and N2

    And I cant really figure out what values to pick for N, N1, N2.

    If my vector is for example [ 0 0 0 0 1 1 1 0 0 0]
    does that count as one period?
  2. jcsd
  3. Feb 19, 2013 #2


    User Avatar

    Staff: Mentor

    Do you have a definition for "box signal"?

    Do you know of any preferred conditions for the end points of the sample set? Do you know of any constraints placed on N (the number of sample points), by the fft function?
  4. Feb 19, 2013 #3
    The box signal is just like a rectangle plotted with stem. i really dont have the formula but it just a vector with a few ones in it.

    No i get to choose all my N,N1 and N2 values. But i have to justify why i choose them.
    It's just to test the fft function
  5. Feb 19, 2013 #4


    User Avatar

    Staff: Mentor

    So, no particular constraints on the ratio of 1's to 0's then?
    This is why I asked about constraints. Look at the documentation for the fft function and see if you can spot any constraints mentioned there; you are not free to pick just any old value for N.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Fourier analysis in matlab
  1. Fourier Analysis (Replies: 1)