Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Matlab The MAT file LAnkle.mat is a matrix of gait analysis data with four columns. The first column is time in seconds, the next three

Matlab

The MAT file LAnkle.mat is a matrix of gait analysis data with four columns. The first column is time in seconds, the next three columns represent x, y and z coordinates of an optical marker placed on patients left ankle.

The z data (inferior-superior motion of marker) is used to determine when a foot strike (or foot hitting ground occurs). The foot strike event can be determined by looking for troughs, or valleys, in the z data.

Write a MATLAB script that does the following:

plots the z data with time. The y label is Inferior-superior left ankle motion (mm), xlabel is time in seconds, and title is Inferior-superior left ankle motion over time.

Finds the foot strike events and saves to a MAT file called StepEvent

Hint: A valley in a set of data is when the current data point is less than the previous data point AND less than the next data point.

This is the LAnkel.mat data:

6.76666666666667 134.727000000000 -948.278000000000 52.3637000000000 6.77500000000000 136.188000000000 -948.646000000000 54.7596000000000 6.78333333333333 137.224000000000 -948.268000000000 57.5735000000000 6.79166666666667 137.842000000000 -947.143000000000 60.8026000000000 6.80000000000000 138.050000000000 -945.266000000000 64.4404000000000 6.80833333333333 137.869000000000 -942.624000000000 68.4770000000000 6.81666666666667 137.332000000000 -939.201000000000 72.8982000000000 6.82500000000000 136.490000000000 -934.973000000000 77.6841000000000 6.83333333333333 135.416000000000 -929.916000000000 82.8100000000000 6.84166666666667 134.196000000000 -924.007000000000 88.2498000000000 6.85000000000000 132.924000000000 -917.226000000000 93.9788000000000 6.85833333333333 131.698000000000 -909.556000000000 99.9742000000000 6.86666666666667 130.609000000000 -900.984000000000 106.211000000000 6.87500000000000 129.740000000000 -891.500000000000 112.655000000000 6.88333333333333 129.153000000000 -881.096000000000 119.262000000000 6.89166666666667 128.880000000000 -869.767000000000 125.969000000000 6.90000000000000 128.918000000000 -857.512000000000 132.698000000000 6.90833333333333 129.217000000000 -844.332000000000 139.347000000000 6.91666666666667 129.684000000000 -830.238000000000 145.793000000000 6.92500000000000 130.192000000000 -815.250000000000 151.898000000000 6.93333333333333 130.593000000000 -799.400000000000 157.519000000000 6.94166666666667 130.739000000000 -782.732000000000 162.514000000000 6.95000000000000 130.494000000000 -765.295000000000 166.756000000000 6.95833333333333 129.750000000000 -747.144000000000 170.139000000000 6.96666666666667 128.437000000000 -728.326000000000 172.584000000000 6.97500000000000 126.528000000000 -708.883000000000 174.043000000000 6.98333333333333 124.038000000000 -688.846000000000 174.495000000000 6.99166666666667 121.026000000000 -668.232000000000 173.952000000000 7 117.579000000000 -647.052000000000 172.448000000000 7.00833333333333 113.811000000000 -625.307000000000 170.039000000000 7.01666666666667 109.848000000000 -602.994000000000 166.800000000000 7.02500000000000 105.818000000000 -580.104000000000 162.815000000000 7.03333333333333 101.844000000000 -556.631000000000 158.183000000000 7.04166666666667 98.0298000000000 -532.576000000000 153.004000000000 7.05000000000000 94.4633000000000 -507.944000000000 147.384000000000 7.05833333333333 91.2108000000000 -482.748000000000 141.427000000000 7.06666666666667 88.3193000000000 -457.008000000000 135.232000000000 7.07500000000000 85.8192000000000 -430.747000000000 128.889000000000 7.08333333333333 83.7284000000000 -403.993000000000 122.484000000000 7.09166666666667 82.0566000000000 -376.773000000000 116.093000000000 7.10000000000000 80.8096000000000 -349.109000000000 109.786000000000 7.10833333333333 79.9930000000000 -321.024000000000 103.629000000000 7.11666666666667 79.6148000000000 -292.537000000000 97.6863000000000 7.12500000000000 79.6872000000000 -263.671000000000 92.0176000000000 7.13333333333333 80.2257000000000 -234.459000000000 86.6823000000000 7.14166666666667 81.2469000000000 -204.953000000000 81.7361000000000 7.15000000000000 82.7652000000000 -175.235000000000 77.2287000000000 7.15833333333333 84.7903000000000 -145.422000000000 73.1987000000000 7.16666666666667 87.3230000000000 -115.673000000000 69.6682000000000 7.17500000000000 90.3515000000000 -86.1943000000000 66.6370000000000 7.18333333333333 93.8477000000000 -57.2341000000000 64.0797000000000 7.19166666666667 97.7648000000000 -29.0731000000000 61.9446000000000 7.20000000000000 102.037000000000 -2.01109000000000 60.1574000000000 7.20833333333333 106.578000000000 23.6517000000000 58.6270000000000 7.21666666666667 111.286000000000 47.6340000000000 57.2550000000000 7.22500000000000 116.045000000000 69.6915000000000 55.9474000000000 7.23333333333333 120.729000000000 89.6319000000000 54.6260000000000 7.24166666666667 125.210000000000 107.326000000000 53.2399000000000 7.25000000000000 129.367000000000 122.714000000000 51.7719000000000 7.25833333333333 133.091000000000 135.804000000000 50.2417000000000 7.26666666666667 136.295000000000 146.671000000000 48.6999000000000 7.27500000000000 138.925000000000 155.446000000000 47.2159000000000 7.28333333333333 140.958000000000 162.306000000000 45.8611000000000 7.29166666666667 142.417000000000 167.466000000000 44.6918000000000 7.30000000000000 143.355000000000 171.164000000000 43.7401000000000 7.30833333333333 143.857000000000 173.656000000000 43.0133000000000 7.31666666666667 144.017000000000 175.199000000000 42.4973000000000 7.32500000000000 143.939000000000 176.037000000000 42.1625000000000 7.33333333333333 143.717000000000 176.388000000000 41.9718000000000 7.34166666666667 143.433000000000 176.435000000000 41.8870000000000 7.35000000000000 143.151000000000 176.320000000000 41.8738000000000 7.35833333333333 142.911000000000 176.144000000000 41.9049000000000 7.36666666666667 142.735000000000 175.969000000000 41.9599000000000 7.37500000000000 142.624000000000 175.831000000000 42.0251000000000 7.38333333333333 142.567000000000 175.737000000000 42.0916000000000 7.39166666666667 142.545000000000 175.681000000000 42.1539000000000 7.40000000000000 142.539000000000 175.648000000000 42.2096000000000 7.40833333333333 142.530000000000 175.621000000000 42.2582000000000 7.41666666666667 142.506000000000 175.585000000000 42.3009000000000 7.42500000000000 142.463000000000 175.531000000000 42.3403000000000 7.43333333333333 142.402000000000 175.457000000000 42.3791000000000 7.44166666666667 142.334000000000 175.369000000000 42.4200000000000 7.45000000000000 142.273000000000 175.281000000000 42.4649000000000 7.45833333333333 142.234000000000 175.210000000000 42.5150000000000 7.46666666666667 142.233000000000 175.173000000000 42.5709000000000 7.47500000000000 142.278000000000 175.184000000000 42.6336000000000 7.48333333333333 142.375000000000 175.246000000000 42.7040000000000 7.49166666666667 142.518000000000 175.353000000000 42.7834000000000 7.50000000000000 142.695000000000 175.491000000000 42.8730000000000 7.50833333333333 142.893000000000 175.643000000000 42.9740000000000 7.51666666666667 143.095000000000 175.792000000000 43.0868000000000 7.52500000000000 143.286000000000 175.924000000000 43.2118000000000 7.53333333333333 143.454000000000 176.036000000000 43.3484000000000 7.54166666666667 143.594000000000 176.130000000000 43.4962000000000 7.55000000000000 143.703000000000 176.220000000000 43.6540000000000 7.55833333333333 143.785000000000 176.324000000000 43.8215000000000 7.56666666666667 143.844000000000 176.462000000000 43.9997000000000 7.57500000000000 143.880000000000 176.647000000000 44.1937000000000 7.58333333333333 143.893000000000 176.882000000000 44.4134000000000 7.59166666666667 143.879000000000 177.162000000000 44.6748000000000 7.60000000000000 143.833000000000 177.476000000000 45.0010000000000 7.60833333333333 143.755000000000 177.811000000000 45.4212000000000 7.61666666666667 143.646000000000 178.157000000000 45.9708000000000 7.62500000000000 143.511000000000 178.515000000000 46.6888000000000 7.63333333333333 143.360000000000 178.891000000000 47.6162000000000 7.64166666666667 143.202000000000 179.304000000000 48.7928000000000 7.65000000000000 143.048000000000 179.780000000000 50.2551000000000 7.65833333333333 142.910000000000 180.353000000000 52.0343000000000 7.66666666666667 142.793000000000 181.068000000000 54.1555000000000 7.67500000000000 142.701000000000 181.978000000000 56.6372000000000 7.68333333333333 142.631000000000 183.148000000000 59.4909000000000 7.69166666666667 142.571000000000 184.656000000000 62.7208000000000 7.70000000000000 142.504000000000 186.592000000000 66.3240000000000 7.70833333333333 142.406000000000 189.054000000000 70.2899000000000 7.71666666666667 142.250000000000 192.152000000000 74.6011000000000 7.72500000000000 142.010000000000 195.999000000000 79.2341000000000 7.73333333333333 141.662000000000 200.706000000000 84.1605000000000 7.74166666666667 141.187000000000 206.376000000000 89.3500000000000 7.75000000000000 140.576000000000 213.094000000000 94.7720000000000 7.75833333333333 139.828000000000 220.921000000000 100.398000000000 7.76666666666667 138.955000000000 229.885000000000 106.204000000000 7.77500000000000 137.983000000000 239.981000000000 112.167000000000 7.78333333333333 136.952000000000 251.173000000000 118.265000000000 7.79166666666667 135.916000000000 263.398000000000 124.472000000000 7.80000000000000 134.935000000000 276.573000000000 130.752000000000 7.80833333333333 134.073000000000 290.609000000000 137.048000000000 7.81666666666667 133.385000000000 305.419000000000 143.279000000000 7.82500000000000 132.906000000000 320.922000000000 149.340000000000 7.83333333333333 132.646000000000 337.058000000000 155.097000000000 7.84166666666667 132.580000000000 353.780000000000 160.400000000000 7.85000000000000 132.656000000000 371.060000000000 165.087000000000 7.85833333333333 132.795000000000 388.884000000000 169.002000000000 7.86666666666667 132.910000000000 407.247000000000 172.004000000000 7.87500000000000 132.910000000000 426.153000000000 173.982000000000 7.88333333333333 132.720000000000 445.616000000000 174.856000000000 7.89166666666667 132.290000000000 465.653000000000 174.588000000000 7.90000000000000 131.601000000000 486.284000000000 173.176000000000 7.90833333333333 130.667000000000 507.530000000000 170.657000000000 7.91666666666667 129.537000000000 529.408000000000 167.105000000000 7.92500000000000 128.287000000000 551.928000000000 162.619000000000 7.93333333333333 127.010000000000 575.088000000000 157.321000000000 7.94166666666667 125.804000000000 598.879000000000 151.348000000000 7.95000000000000 124.758000000000 623.279000000000 144.843000000000 7.95833333333333 123.947000000000 648.259000000000 137.951000000000 7.96666666666667 123.421000000000 673.784000000000 130.812000000000 7.97500000000000 123.210000000000 699.817000000000 123.555000000000 7.98333333333333 123.321000000000 726.323000000000 116.302000000000 7.99166666666667 123.747000000000 753.271000000000 109.159000000000 8 124.469000000000 780.632000000000 102.228000000000 8.00833333333333 125.465000000000 808.377000000000 95.5969000000000 8.01666666666667 126.714000000000 836.474000000000 89.3523000000000 8.02500000000000 128.194000000000 864.878000000000 83.5723000000000 8.03333333333333 129.889000000000 893.523000000000 78.3286000000000 8.04166666666667 131.785000000000 922.315000000000 73.6827000000000 8.05000000000000 133.865000000000 951.122000000000 69.6815000000000 8.05833333333333 136.115000000000 979.773000000000 66.3513000000000 8.06666666666667 138.515000000000 1008.05000000000 63.6915000000000 8.07500000000000 141.041000000000 1035.71000000000 61.6696000000000 8.08333333333333 143.666000000000 1062.46000000000 60.2170000000000 8.09166666666667 146.362000000000 1088.01000000000 59.2300000000000 8.10000000000000 149.099000000000 1112.05000000000 58.5743000000000 8.10833333333333 151.847000000000 1134.32000000000 58.0960000000000 8.11666666666667 154.572000000000 1154.58000000000 57.6364000000000 8.12500000000000 157.238000000000 1172.66000000000 57.0511000000000 8.13333333333333 159.800000000000 1188.47000000000 56.2282000000000 8.14166666666667 162.205000000000 1201.97000000000 55.1042000000000 8.15000000000000 164.396000000000 1213.24000000000 53.6727000000000 8.15833333333333 166.314000000000 1222.41000000000 51.9845000000000 8.16666666666667 167.909000000000 1229.69000000000 50.1369000000000 8.17500000000000 169.144000000000 1235.33000000000 48.2549000000000 8.18333333333333 170.004000000000 1239.60000000000 46.4661000000000 8.19166666666667 170.506000000000 1242.77000000000 44.8771000000000 8.20000000000000 170.691000000000 1245.09000000000 43.5576000000000 8.20833333333333 170.631000000000 1246.76000000000 42.5378000000000 8.21666666666667 170.410000000000 1247.99000000000 41.8157000000000 8.22500000000000 170.120000000000 1248.90000000000 41.3666000000000 8.23333333333333 169.846000000000 1249.61000000000 41.1516000000000 8.24166666666667 169.656000000000 1250.19000000000 41.1249000000000 8.25000000000000 169.591000000000 1250.70000000000 41.2391000000000 8.25833333333333 169.666000000000 1251.15000000000 41.4487000000000 8.26666666666667 169.868000000000 1251.56000000000 41.7129000000000 8.27500000000000 170.165000000000 1251.93000000000 41.9967000000000 8.28333333333333 170.512000000000 1252.24000000000 42.2717000000000 8.29166666666667 170.863000000000 1252.50000000000 42.5166000000000 8.30000000000000 171.175000000000 1252.69000000000 42.7178000000000 8.30833333333333 171.418000000000 1252.81000000000 42.8691000000000 8.31666666666667 171.574000000000 1252.87000000000 42.9710000000000 8.32500000000000 171.642000000000 1252.87000000000 43.0300000000000 8.33333333333333 171.636000000000 1252.83000000000 43.0562000000000 8.34166666666667 171.581000000000 1252.76000000000 43.0623000000000

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

Step: 3

blur-text-image

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

Professional SQL Server 2012 Internals And Troubleshooting

Authors: Christian Bolton, Justin Langford

1st Edition

1118177657, 9781118177655

More Books

Students also viewed these Databases questions