Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Frequency response of a time-based function

Frequency response of a time-based function

Frequency response of a time-based function

I'm new to Mathcad (and this forum...), I hope anyone can help me with this problem.

I imported a time-based signal from Excell into Mathcad and stored time and signal into range variables. It concerns the displacement of a vehicle shock absorber. The original signal has 4806 samples measured over a time of 93.8 seconds, so I removed samples at the end to get a total of 4096 samples (using the submatrix command).

After that I got lost... I would like to calculate the frequency response of this signal using the fft or cfft command and graph the results (fft result against frequency).
Could anyone help me with the commands to do this?

Thanks already...

Jorge Segers

RE: Frequency response of a time-based function

Isn't is just a case of:


then going to:


type in the variables on the graph axes - job done?


-- drej --

RE: Frequency response of a time-based function

Thanks Drej,

I got this far: I created a range variable containing the fft function of the original signal. This should be the Y-axis in the plot. But how do I put frequency on the X-axis?
In the shock displacement signal every data point is related to a point on the time-axis. The signal is a range variable as big as the time range variable. I fft the signal which is as well a range variable of the same size as the original signal. How do I relate this to a frequency range variable?

I'm probably missing something straightforward here, but I'm not really familiar with these kind of things...


RE: Frequency response of a time-based function

I think you need to read up on the theory of Fourier Transforms.


You need to create your own vector of frequency values.

You know that the total sample length is 79.942 s long.

Therefore, the frequency resolution is 1/T, ie 0.012509 Hz, and the first line is at 0 Hz.

Incidentally there is a gotcha when plotting the FFT as proposed above. That will only plot the real part of the spectrum, which is complex. Use | to plot the magnitude and arg for the argument.

You should also read up on the amplitude scaling factors used and the differences between cfft FFT fft etc


Greg Locock

RE: Frequency response of a time-based function

Finally got it right!

Thanks for the info!

Jorge Segers

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close