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

Graphing two different data sets against time

Graphing two different data sets against time

Graphing two different data sets against time

I was wondering if someone can help me with this question.
I'm doing some mechanical testing and for reasons that I won't go in to, I've got the stress data against time in one file and the strain data against time in another file. I would like to plot stress against strain on a graph. My problem is that the data aquisition rate is different between the stress and the strain, so it's not easy to plot one against another. Is it possible to get Matlab to interpolate for me between the two graphs? I could write a program to do it but I was wondering if there was a function that would just work.

RE: Graphing two different data sets against time

Yes, "interp1" (that's a digit one on the end) is the function you need.
If one of the signals will be undersampled then you will need to filter it first to avoid aliasing. I would recommend oversampling the signal with the lower acquisition rate to have the same rate as the signal with the higher acqusition rate.


Dr Michael F Platten

RE: Graphing two different data sets against time

Thanks Michael, I got it working just the way you recommended.

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


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