Question: You are given x , y marker data for the knee, ankle, and toe. Positions are in meters, and the origin of the coordinate system

You are given x,y marker data for the knee, ankle, and toe. Positions are in meters, and the origin of the coordinate system if the
global lab system.
- knee =[0.172,0.432]
- ankle =[-0.128,0.249]
- toe =[-0.081,0.051]
Calculate the ankle angle following the convention shown in the figure below.
What is wrong with my code?
%% To calculate the ankle angle using the convention shown in the figure above, the foot and shank segment angles need to be calculated.
% Create a variable named knee_(x)y and assign the x-value for the knee to the first element of a row vector and the y-value of the knee to the second element of the vector.
knee_(x)y =[0.172,0.432];
% Create a variable named ankle_(x)y and assign the x-value for the ankle to the first element of a row vector and the y-value of the ankle to the second element of the vector.
ankle_(x)y =[-0.128,0.249];
% Create a variable named toe_(x)y and assign the x-value for the toe to the first element of a row vector and the y-value of the toe to the second element of the vector.
toe_(x)y =[-0.081,0.051];
% Calculate the shank segment angle in degrees and assign to variable shank_(a)ngle
shank_(a)ngle = atan2d(ankle_(x)y(2)- knee_(x)y(2), ankle_(x)y(1)- knee_(x)y(1));
% Calculate the foot segment angle in degrees and assign to variable foot_(a)ngle
foot_(a)ngle = atan2d(toe_(x)y(2)- ankle_(x)y(2), toe_(x)y(1)- ankle_(x)y(1));
% Calculate the ankle angle in degrees and assign to variable ankle_(a)ngle
ankle_(a)ngle = foot_(a)ngle - shank_(a)ngle +90;
You are given x , y marker data for the knee,

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!