Normalizing data to 100 Percent

25 views (last 30 days)
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.

Accepted Answer

Star Strider
Star Strider on 14 Jul 2022
Edited: Star Strider on 14 Jul 2022
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 Comments
Perri Johnson
Perri Johnson on 22 Jul 2022
@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 on 22 Jul 2022
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!