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!

Help with matlab

  1. Oct 31, 2014 #1
    • OP warned about not using homework template
    i am trying to figure out digits in a dtmf signal using matlab with the fft command however i not sure how to figure out what digit is being pressed.

    I am doing this

    stem(abs(signal)) and get a plot with several digits pressed but not sure how to figure out which are pressed, any help would be appreciated
  2. jcsd
  3. Oct 31, 2014 #2


    Staff: Mentor

    DTMF stands for dual tone multifrequency. Each key on the keypad causes two frequencies to be generated. With your stem plot, you should be getting two vertical bars for each DTMF tone.

    For example, the frequencies for the '1' key are 697Hz and 1209Hz. See the table in the Keypad section here - http://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling.
  4. Oct 31, 2014 #3
    thank you for your reply, i understand how dmtf works however the results i am getting are not making sense to me, for example i am getting this, not sure how to view the higher and lower frequencies

    Attached Files:

  5. Oct 31, 2014 #4


    Staff: Mentor

    The difficulty is in working with several keys at the same time. Is there any way to look at the plot of one key at a time? Also, what's causing the spikes at around 6500 Hz and 7000 Hz? Those are DTMF signals.
  6. Oct 31, 2014 #5
    not sure how to process that in matlab, i know how many samples and spacing per key how can i process just certain samples with fft?

    i tried fft(singal,[],dim); where dimension is a vector [start:end] however i get an error

    "Dimension argument must be a positive integer scalar within indexing range."

    regarding the 6k and 7k spikes, not sure what they are because there is nothing in that range

    thank you for your time in trying to explain it to me
  7. Oct 31, 2014 #6


    Staff: Mentor

  8. Oct 31, 2014 #7
    i looked at that however i really dont understand how to do it by sections, in dimensions i tried using a vector with start:end but it always gives me the error above, could you explain how it works?
  9. Nov 1, 2014 #8


    Staff: Mentor

    That dim argument needs to be a scalar value, not a vector. Your signal argument is a vector, right? You can call the fft function like this:
    Code (Text):
    Result = fft(signal, N)
    Here N is the number of elements in the signal vector. The documentation isn't as clear as it could be, and I don't have matlab to test things, but N might need to be a power of 2, like in the example on this doc page -- http://www.mathworks.com/help/matlab/ref/fft.html.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted

Similar Discussions: Help with matlab
  1. Help in Matlab (Replies: 1)

  2. Matlab HELP ! (Replies: 4)

  3. Matlab help (Replies: 2)

  4. Matlab help (Replies: 2)

  5. MATLAB help (Replies: 2)