Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Graphing two different data sets against time

Status
Not open for further replies.

GeorgeEllwood

Mechanical
Aug 22, 2006
134
GB
Hello,
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.
Thanks
George
 
Replies continue below

Recommended for you

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.

M

--
Dr Michael F Platten
 
Thanks Michael, I got it working just the way you recommended.
Cheers
George
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top