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

To: mathgroup at smc.vnet.net

Subject: [mg52439] any users of the signals&systems package? how to find Discrete Time Fourier Series?

From: nospam nospam <nospam_please at nospam.com>

Date: Sat, 27 Nov 2004 01:40:38 -0500 (EST)

Sender: owner-wri-mathgroup at wolfram.com

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