Rate of Force Development for Isometric Mid-Thigh Pull

조회 수: 7 (최근 30일)
Jenevieve Roper
Jenevieve Roper 2024년 3월 22일
편집: Star Strider 2024년 3월 22일
I am trying to calculate rate of force development by creating arrays of time and force, determining the change in force to the maximum and the time it takes to get there. However, I keep running into an error that reads 'Index exceeds the number of array elements. Index must not exceed 182.' I've gone through the code several times and re-wrote it in various ways to help clarify, but I am running into the issue of not being able to calculate the time it takes to get to the maximum. The code that is not working is as follows:
rRFD = (r_Peak - r_vGRF(1))/(rtime(1:r_Peak(i)))
It appears that I can calculate the change in force to the peak, but the code will not allow me to calculate the time it takes to do so. The first part of the code works perfectly. 'rtime' when input in the command window produces all the timepoints starting at zero. However, when I use 'rtime(r_Peak)' I get an error that says 'Array indices must be positive integers or logical values.' and I cannot figure out why I cannot determine the time at this specific timepoint.

답변 (1개)

Star Strider
Star Strider 2024년 3월 22일
편집: Star Strider 2024년 3월 22일
The denominator is a vector, so you need to use element-wise division (./) instead of matrix division (/) —
rRFD = (r_Peak - r_vGRF(1))./(rtime(1:r_Peak(i)))
When you are dealing with arrays (vectors or matrices) use element-wise operators unless you specifically intend to do matrix calculations. See the documentation section on Array vs. Matrix Operations for details.
EDIT — Corrected typographical errors.

카테고리

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

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by