MATLAB: How to find the gradient of a gait curve

for loopgaitgradientgraphinterpretloopMATLABpeakwave

I am currently aiming to interpret the results of a gait curve I have just done, and try and interpret where the toe off and heel strikes occur, as well as find the loading rate.
patienttime=patient01grass(:,1);
patienttimearray=table2array(patienttime);%ensure time is an array
patientleftforceratio=patient01grass(:,5);
patientleftforceratioarray=table2array(patientleftforceratio);%ensure left foot ratio is an array
patientleftforceratio=patient01grass(:,9);
patientleftforceratioarray=table2array(patientleftforceratio);%ensure right foot ratio is an array
for i=1:1000;
forcechange(i+1)=patientleftforceratioarray(i+1)-patientleftforceratioarray(i);
timechange(i+1)=patienttimearray(i+1)-patienttimearray(i);
end
plot(g)
The graph produced is
I require interpreting the gradients at every point of ascent.

Best Answer

A simplification of your loop:
forcechange = diff(patientleftforceratioarray);
timechange = diff(patienttimearray);
You can get the gradient by:
v = gradient(patientleftforceratioarray, patienttimearray)
By the way, I suggest to use shorter names for the variables. "LeftForce" might be clear enough already.