any users of the signals&systems package? how to find Discrete Time Fourier Series?

Discussion in 'Mathematica' started by Guest, Nov 27, 2004.

  1. Guest

    Guest Guest

    Hi;

    Any one here uses the Mathematica Signals & Systems package?

    I am unable to find how to determine the DTFS.

    For example, this is a periodic, discrete signal, that has
    a period of 6 samples.

    x[n]:= Cos[Pi n/3];


    The closest function I could find is to call DFT (even though
    this signal does not belong to this class), then divide
    the result by 6 (the period), but this does not give
    the correct result.

    Needs["SignalProcessing`"];
    x[n_] := Cos[ Pi n/3];
    M := 6;
    seq = DiscreteFourierTransform[x[n], M, n, k];
    func = TransformFunction[seq];
    func = (1/M) func[[2, 1]]

    The result is {0,1/6,0,1/6,0}

    while the correct result should be {0,1/2,0,0,0,1/2}

    I have tried this on other signals and I can't get
    the correct result on any one them.

    any one using this package can show me how to do this?

    thank you,
    nospam
     
    Guest, Nov 27, 2004
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.