function Velocity=Vcurve5(v,radius) %this function gives you the Velocity on a curve with a given radius, %given a velocity on the straight v. m=1; g=9.81; BW=m*g; VO2submax=0.02724*v^3+1.7321*v^2-0.4538*v+18.91; %equation from Kipp et al. 2018, this is the oxygen utilization on the straight for V=v:-0.00000001:0 %each iteration it decreases the velocity, until VO2submaxCurve is equal to VO2submax CentripetalForce=m*V^2/radius; AxialForce=sqrt(BW^2+(CentripetalForce^2)); AxialForceBW=AxialForce/BW; GMR=0.6234*AxialForceBW+0.3766; %calculating GrossMetabolicRate as a function of Axial Leg Force VO2submaxCurve=(0.02724*V^3+1.7321*V^2-0.4538*V+18.91)*GMR; %oxigen utilization on the curve if VO2submaxCurve<=VO2submax break end end Velocity=V; end