Hi,
I'm trying to take strain and vertical force data I have and normalize the cycle to 100% from start to finish for one cycle so that I can see if there is a correlation between the two. Does anyone have any advice for how I could go about this process?
I've tried using the normalize function within MATLAB but that only returns the z-score. I've also tried using a threshold funciton to normalize the data between two established points (start/stop of testing) but the problem with this is that you don't know if those specific thresholds line up with each other between the strain and force data. Seems more fabricated.

 채택된 답변

Star Strider
Star Strider 2022년 7월 14일
편집: Star Strider 2022년 7월 14일

0 개 추천

One option with normalize is to use the 'range' method or methodtype, and multiply the result by 100. See the documentation for details.
EDIT — (14 Jul 2020 at 19:30)
Example —
v = randi(17, 1, 10)
v = 1×10
3 13 12 6 15 6 5 8 17 6
nv = normalize(v, 'range') * 100
nv = 1×10
0 71.4286 64.2857 21.4286 85.7143 21.4286 14.2857 35.7143 100.0000 21.4286
.

댓글 수: 8

Perri Johnson
Perri Johnson 2022년 7월 14일
But that just gives each value as a certain percentage, right?
I'm manily looking to end with a column of 100 points
Star Strider
Star Strider 2022년 7월 14일
If you begin with a column of 100 points, the result will be a normalised column of 100 points.
What are you starting with, and what do you want as a result?
Perri Johnson
Perri Johnson 2022년 7월 22일
I'm starting with strain data over about 12-15sec of time and looking to normalize the data to about 100 points (basically pull points from the start of the the testing trial to the end of the testing trial). This way I can try to find a correlation between strain and force data
Star Strider
Star Strider 2022년 7월 22일
By ‘normalise’ do you actually intend ‘extrapolate’?
I never recommend extrapolating data, since that creates new data where none previously existed, without actually measuring any more data.
Interpolating data is appropriate in some situations, providing the interpolation is to shorten a longer vector to match a shorter vector. This essentially resamples the longer vector data, and if you are doing signal processing, the resample function is appropriate for that.
Perri Johnson
Perri Johnson 2022년 7월 22일
Not trying to base each point as a percent of the max strain value. rather I want 100 points from the data (from start to stop) that can represent the whole trial.
Perri Johnson
Perri Johnson 2022년 7월 22일
I did attempt that method previously, but my professor recommended that this would not be the way to go because I'm dealing with two different data sets (strain and force) from two different pieces of equipment and since they were sampled at 794Hz and 100Hz, respectively, that I might be superimposing if I were to up-sample the 100Hz data set that much.
Perri Johnson
Perri Johnson 2022년 7월 22일
@Star Strider I got to thinking about your previous suggestion of the interp1 function and did a little more digging and came across this post you suggested that solved my problem! https://www.mathworks.com/matlabcentral/answers/515319-finding-the-index-of-x-values-to-create-an-equally-spaced-array
Thanks for the help!!
Star Strider
Star Strider 2022년 7월 22일
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

질문:

2022년 7월 14일

댓글:

2022년 7월 22일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by