cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Can MathCAD do Discrete Fourier Transforms of a waveform?

nb�ckman
1-Newbie

Can MathCAD do Discrete Fourier Transforms of a waveform?

Can MathCAD do Discrete Fourier Transforms of a waveform?

I am totally new to MatchCAD. I am using Excel for theses things, but it it is time consuming to fill the DFT matrice with the SIN and COS values.

The waveform can be a square wave, triangular, or similar basic wave shapes.

Follow up question would be: How to create the sample values of the original waveform, defined in continuous time?

4 REPLIES 4
RichardJ
19-Tanzanite
(To:nb�ckman)

Can MathCAD do Discrete Fourier Transforms of a waveform?

I am totally new to MatchCAD. I am using Excel for theses things, but it it is time consuming to fill the DFT matrice with the SIN and COS values.

Sure. It's a piece of cake. Just use the FFT or CFFT functions. It will even do 2D transforms, and has built in functions to do operations based on FTs, such as convolution, autocorrelation etc.

A quote from a long time ago, from I forget where: "Mathcad is to Excel what Excel is to a pocket calculator."

The waveform can be a square wave, triangular, or similar basic wave shapes.

Follow up question would be: How to create the sample values of the original waveform, defined in continuous time?

I'm not sure what you mean. Do you have a function, and want to know the FT? Mathcad can do symbolic math as well, so in such a case it's possible that you don't need to create any sample values. If you do, it's easy to do though, but we need a better description of exactly what you are trying to do.

Thanks you very much for the quick answer:

How to create the sample values of the original waveform, defined in continuous time?

To do the DFT I need a sampled waveform, which can be represented by a list of values:

Example: Cos(2PI/N); Cos(2*2PI/N); Cos(3*2PI/N).........Cos(N*2PI/N)

This list of numbers forms a vector. So, my problem is how can I generate this vector?

Probably a piece of cake, 🙂 Am I right?

Having this vector, I can probably do the FFT as you indicate above?

So the FFT (DFT) needs to generate a N x N matrix, but since my input is a N matrix, perhaps the FFT automatically generates the right N x N Fourier transform matrix? Is that so?

Would the output then be another N matrix? That will be another big array of numbers.

Can I plot it?

RichardJ
19-Tanzanite
(To:nb�ckman)

Define the number of points, create an index variable, fill the vector x, calculate the vector y, FFT it, plot the real and imaginary parts. However, if you are starting with a function, rather than measured data, Mathcad may be able to give you FT of the function (i.e. symbolic FT, not DFT). Doing this kind of thing in Mathcad really is an order of magnitude easier than doing it in Excel. Excel is great if you want to look at tables of numbers. I.e. if you are an accountant. For science and engineering calculations it is seriously underpowered.

Example attached (Prime 3.0)

Top Tags