Question: % Question 3 - Writing data to file in a formatted manner [4 marks] $ % Question 3.1 Write some of the data from question

 % Question 3 - Writing data to file in a formatted
manner [4 marks] $ % Question 3.1 Write some of the data
from question 2 to a txt file using your username, e.g. menaej.txt.

% Question 3 - Writing data to file in a formatted manner [4 marks] $ % Question 3.1 Write some of the data from question 2 to a txt file using your username, e.g. menaej.txt. % The file should have a header for full marks and 4 columns of % data, time and the three relative hand positions in x, y and z $ directions respectively. Feel free to use any method to do this. Data & should be to three decimal places. Data should be tab separated. [4 % marks) Place your code here. % Question 2 - File I/O and plotting. [12 Marks] % Question 2.1 The file human_motion data.csv contains 60 columns of data, % each set of three columns represent the X, Y and 2 locations of a human body $ marker. For example the first three columns are the Hip centre X, Y and Z positions. Open the file outside of MATLAB to see the data. Create two new matrices, hand_position and shoulder position. These matrices should both contain 3 columns of X, Y and 2 data and hold the position data for the right hand and right shoulder respectively. [2 marks] 3 1 2 3 thand_position shoulder_position 5 16 67 * Question 2.2 We are interested in the right hand position relative to the initial $ right shoulder position. Take away the initial shoulder position from the whole hand_position matrix and set to a matrix relative hand which should still have 3 columns. [1 mark] 10 relative hand 12 13 Question 2.3 - If the data is recorded at 2012, croato a vector, time, + that has the same number of rows an relative hand, and contains the time ILA Importers Sayed im FadhuDesktop ME 11010 assessment 202\human motion data cw PORT VIEW Faed Width Delter Options Delimited Column delanters Output Type: Replace Range AB Comma uniportable cells with all Table Variable Names Row 1 import Text Option Selection DELIMITERS SELECTION potripATA UNPORTABLE CELLS PORT humanumotion data.es G H M humanmotiondata Collection... VarName2 Varme Varamel Varlame VarName VarName? VarName VarName9 VarName10 VarNamell Var Name12 VarName13 VarName14 Var Names Number Number Number Number - Number Number Number Number Number Number Number Number ber "Numbe -Number Collection d. 12/12/2020 Sample rate: 20H Units metres Hip centre X Hipote Y Hp cente 2 Spine X Spine Spine 2 Shoulder ces Shoulder Shoulde ad X HY Head Luft should let shok Lett should le 0,17593 -0.055022 -0.18033 0.01273 1.77136 -0.17774 0.24753 1.7803 14975 0.42 1.749 034501 15454 17025 0.17472 00555 -0.1796 -0.012809 17746 -0.17790 0.268 1.7301 -0.10902 0012924 1.7484 -0.3517 0.15093 1714 0 -0.175012 -0.055207 17306 -0.17976 -0.012976 1977.33 -0.17855 0.2472 17795 0151118 043019 1.793 034533 0.15009 1.781 0.17438 -0.055834 1.7311 -0.18067 -0.012657 17738 0.17899 024701 1.7195 15165 043028 17494 0330 015121 11821 1 0.17572 0552 17216 -0.12958 -0.012029 1.7747 0.1774 0.24699 11.7792 0.1518 0430 1741 03522 1530 17021 -0 30.1756 0.055355 1.7301 -0.18057 -0.013561 1.7744 -0.17795 024621 1.7791 -0.15001 04949 1.75 0.16 015706 1.7827 0 10.17422 -0.05523 1.7305 012054 -0.013582 1.2746 -0.17731 024686 1780 -2 150 04079 11493 -0.44 0.15 20.17548 -0.056618 1.7303 0.18067 -0.013171 17743 -0.17813 02798 1:7809 015112 04291 1.7490 034559 0.15171 . 10.114 055575 1.7307 017903 -0.012535 1.2735 -0.11772 024634 1.7804 -0.15167 00041 1.7 0.3465 0.15093 057433 0055756 1.2016 0.17945 -0.013125 1.2747 0.17705 024714 1.7795 -0.15017 042016 1.70 03565 0.15457 17 0 50.17447 -0.056891 1781 017956 -0.013835 1.774 -0.17703 0.24756 1.7805 -0.15027 DJ067 12 0.1546 10.17446 0055071 1.7214 0.18018 0.01377 1773 0.17859 0.24551 1.7804 134635 0.15141 11011 17471 01511 02 0.055565 20.17528 -0.012902 1.7308 1.770 -0.17713 0.24672 1.7797 0.150 04624 15316 0.42519 0 1.7113 10.17515 -0.0564 017900 0619 -0.013 101 0.24612 15200 1.7732 17791 1722 -0.17725 015101 14 1.7472 -02 -0,05646 1.7314 0,17489 1.7733 -0.17730 0.24634 1.7792 1500 1036 4613 0.013705 1.2478 015 1.183 0 0.15 0 0.1755 1512 -0.056649 101797 12319 1.7802 -0.012745 1774 0.17857 24644 -0.15117 0.42105 1779 SIR Type here to search NING 2011 % Question 3 - Writing data to file in a formatted manner [4 marks] $ % Question 3.1 Write some of the data from question 2 to a txt file using your username, e.g. menaej.txt. % The file should have a header for full marks and 4 columns of % data, time and the three relative hand positions in x, y and z $ directions respectively. Feel free to use any method to do this. Data & should be to three decimal places. Data should be tab separated. [4 % marks) Place your code here. % Question 2 - File I/O and plotting. [12 Marks] % Question 2.1 The file human_motion data.csv contains 60 columns of data, % each set of three columns represent the X, Y and 2 locations of a human body $ marker. For example the first three columns are the Hip centre X, Y and Z positions. Open the file outside of MATLAB to see the data. Create two new matrices, hand_position and shoulder position. These matrices should both contain 3 columns of X, Y and 2 data and hold the position data for the right hand and right shoulder respectively. [2 marks] 3 1 2 3 thand_position shoulder_position 5 16 67 * Question 2.2 We are interested in the right hand position relative to the initial $ right shoulder position. Take away the initial shoulder position from the whole hand_position matrix and set to a matrix relative hand which should still have 3 columns. [1 mark] 10 relative hand 12 13 Question 2.3 - If the data is recorded at 2012, croato a vector, time, + that has the same number of rows an relative hand, and contains the time ILA Importers Sayed im FadhuDesktop ME 11010 assessment 202\human motion data cw PORT VIEW Faed Width Delter Options Delimited Column delanters Output Type: Replace Range AB Comma uniportable cells with all Table Variable Names Row 1 import Text Option Selection DELIMITERS SELECTION potripATA UNPORTABLE CELLS PORT humanumotion data.es G H M humanmotiondata Collection... VarName2 Varme Varamel Varlame VarName VarName? VarName VarName9 VarName10 VarNamell Var Name12 VarName13 VarName14 Var Names Number Number Number Number - Number Number Number Number Number Number Number Number ber "Numbe -Number Collection d. 12/12/2020 Sample rate: 20H Units metres Hip centre X Hipote Y Hp cente 2 Spine X Spine Spine 2 Shoulder ces Shoulder Shoulde ad X HY Head Luft should let shok Lett should le 0,17593 -0.055022 -0.18033 0.01273 1.77136 -0.17774 0.24753 1.7803 14975 0.42 1.749 034501 15454 17025 0.17472 00555 -0.1796 -0.012809 17746 -0.17790 0.268 1.7301 -0.10902 0012924 1.7484 -0.3517 0.15093 1714 0 -0.175012 -0.055207 17306 -0.17976 -0.012976 1977.33 -0.17855 0.2472 17795 0151118 043019 1.793 034533 0.15009 1.781 0.17438 -0.055834 1.7311 -0.18067 -0.012657 17738 0.17899 024701 1.7195 15165 043028 17494 0330 015121 11821 1 0.17572 0552 17216 -0.12958 -0.012029 1.7747 0.1774 0.24699 11.7792 0.1518 0430 1741 03522 1530 17021 -0 30.1756 0.055355 1.7301 -0.18057 -0.013561 1.7744 -0.17795 024621 1.7791 -0.15001 04949 1.75 0.16 015706 1.7827 0 10.17422 -0.05523 1.7305 012054 -0.013582 1.2746 -0.17731 024686 1780 -2 150 04079 11493 -0.44 0.15 20.17548 -0.056618 1.7303 0.18067 -0.013171 17743 -0.17813 02798 1:7809 015112 04291 1.7490 034559 0.15171 . 10.114 055575 1.7307 017903 -0.012535 1.2735 -0.11772 024634 1.7804 -0.15167 00041 1.7 0.3465 0.15093 057433 0055756 1.2016 0.17945 -0.013125 1.2747 0.17705 024714 1.7795 -0.15017 042016 1.70 03565 0.15457 17 0 50.17447 -0.056891 1781 017956 -0.013835 1.774 -0.17703 0.24756 1.7805 -0.15027 DJ067 12 0.1546 10.17446 0055071 1.7214 0.18018 0.01377 1773 0.17859 0.24551 1.7804 134635 0.15141 11011 17471 01511 02 0.055565 20.17528 -0.012902 1.7308 1.770 -0.17713 0.24672 1.7797 0.150 04624 15316 0.42519 0 1.7113 10.17515 -0.0564 017900 0619 -0.013 101 0.24612 15200 1.7732 17791 1722 -0.17725 015101 14 1.7472 -02 -0,05646 1.7314 0,17489 1.7733 -0.17730 0.24634 1.7792 1500 1036 4613 0.013705 1.2478 015 1.183 0 0.15 0 0.1755 1512 -0.056649 101797 12319 1.7802 -0.012745 1774 0.17857 24644 -0.15117 0.42105 1779 SIR Type here to search NING 2011

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 Databases Questions!