Normalizing data to 100 Percent

조회 수: 29 (최근 30일)
Perri Johnson
Perri Johnson 2022년 7월 14일
댓글: Star Strider 2022년 7월 22일
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일
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월 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개)

카테고리

Help CenterFile Exchange에서 Assembly에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by