Dobbeljoe Posted January 24 Share Posted January 24 I measure two channels: Force and Displacement. I calculate and record the maximum value of force during the measurement. Now I would like to know the corresponding value of the displacement when the force is at the maximum. Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted January 24 Share Posted January 24 The max() function will actually return a timestamp of the max point, so: private forceMax = max(force) forceMax will be the maximum of force, and getTime(theMax) will have the timestamp for that maximum. You can then use that timestamp to subset displacement. You'll need a little buffer since the timestamps might not be identical. It depends on how you are acquiring the data. For example: private dispAtForceMax = (displacement[getTime(forceMax)-0.05, getTime(forceMax)+0.05])[0] I picked 0.05. You should probably use about 1/2 the acquisition time, so if your timing is 0.1, you'd use the 0.05 I used. The extra [0] at the end is just in case you have two datapoints in that time range. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.