Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Rewrite the following MATLAB script with regards to the Gait Analysis provided to calculate and plot the knee joint angle for a complete gait cycle

Rewrite the following MATLAB script with regards to the Gait Analysis provided to calculate and plot the knee joint angle for a complete gait cycle (heel strike to heel strike). In order to accomplish this, create a MATLAB function to read the .csv file and pass the contents obtained in a "structure" to the main script. You must eliminate the "for loop" with an appropriate "operator". Then, calculate the joint angle from the segment angles and plot over the appropriate scale. The .csv file is also PROVIDED BELOW.

image text in transcribed

Figure 1 (above): GaitCycleAnalysis Script

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Figure 2 (above): Complete windata.csv data

image text in transcribed

Figure 3 (above): A Plot of what the script should produce

To calculate the angle, use the equation (transcribed in the script) as:

skTHETA = (atan((trajdata(:,7)-trajdata(:,11))./(trajdata(:,6)-trajdata(:,10))))*180/pi; skTHETA(skTHETA

CSV FILE: https://www.dropbox.com/s/tok2a3c6mvv9mry/windata.csv?dl=0

Define the file to be read file'windata.csv' % Read Trajectory Data contained within "CSV file to an array trajdata -csvread(file); % Calculate Shank Angle for i-1: 106 skTHETA ( ) (atan((traj data(,7)-traj data(i,11) ) / ( traj data(i,6)-traj data(i,10))))*180/pi; end % Create a plot figure( 'Name, 'Segment Orientation Window') plot (trajdata(:,1), skTHETA); xlabel ('time' pause close(1) clear Define the file to be read file'windata.csv' % Read Trajectory Data contained within "CSV file to an array trajdata -csvread(file); % Calculate Shank Angle for i-1: 106 skTHETA ( ) (atan((traj data(,7)-traj data(i,11) ) / ( traj data(i,6)-traj data(i,10))))*180/pi; end % Create a plot figure( 'Name, 'Segment Orientation Window') plot (trajdata(:,1), skTHETA); xlabel ('time' pause close(1) clear

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

More Books

Students also viewed these Databases questions

Question

6. Explain how to train managers to coach employees.

Answered: 1 week ago

Question

5. Tell how job experiences can be used for skill development.

Answered: 1 week ago