×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• 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.

# Frequency response of a time-based function

## Frequency response of a time-based function

(OP)
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?

Jorge Segers

Replies continue below

### RE: Frequency response of a time-based function

Isn't is just a case of:

output_variable_name=fft(your_data_variable_name)

then going to:

INSERT > GRAPH > X-Y PLOT

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

Cheers,

-- drej --

### RE: Frequency response of a time-based function

(OP)
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...

Regards,
Jorge

### RE: Frequency response of a time-based function

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

However:

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

Cheers

Greg Locock

### RE: Frequency response of a time-based function

(OP)
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.

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:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!