Question: Help with Question part c , d and e please The muscular system is an important part of the human body, playing a major role

Help with Question part c,d and e please
The muscular system is an important part of the human body, playing a major role in nearly all aspects of life. The body
controls muscle contraction using electrical signals from the nerves. Muscle activation is quantified using a measurement
technique called electromyography (EMG for short), and this data can be used to calculate multiple parameters about
the state of muscle activity.
The file EMGdata.txt contains measured EMG data from multiple muscles. The first column of the data contains the time
since the beginning of the measurement in seconds, with subsequent columns containing the measured electrical
activity of each muscle in millivolts (mV).
a. Import the file EMGdata.txt, and store all the electrical activity data as one matrix under one variable name.
b. Create a 2-by-1 subplot in a figure. In the first subplot, plot all four channels against time on the same graph
using the MATLAB default graph colours and dots.
c. Create a function named remove_negatives(this should be in a separate .m file that can be called from within
your lab script) that cleans the provided data of negative numbers by removal and provides information about
the cleaning. The function documentation is provided below:
%[clean_data1, clean_data2, num_negative, num_non_negative]= remove_negatives(data1, data2)
%
% cleans the provided data of negative numbers by removal and provides
% information about the cleaning
% Author: ___, Date: ___
%
% input:
% data1- vector of provided data to clean by removal of negative numbers
% data2- vector of provided data that corresponds to data1(i.e. if data1 is the dependent
% variable, data2 is the independent variable, and vice versa)
%
% output:
% clean_data1- vector of data1 but with negative numbers removed
% clean_data2- vector of data2 but with entries removed that correspond to negative values % in
data1
% num_negative - the number of negative numbers in data1(i.e. the number of removed elements)
% num_non_negative - the number of non-negative numbers in data1(i.e. the number of remaining
% elements)
8 Important: If you are struggling with a task, ensure that you have performed hand-written work (e.g. hand
calculations, pseudocode, flow charts) to better understand the processes involved. Do this before asking demonstrators
for help and use it to assist with your illustration of the problem.
d. Due to errors in the calibration of the measurement equipment, the data recorded in EMGdata.txt is affected by
some error. As such, the EMG data in channel 4 with negative values must be removed. Use the
remove_negatives function on only channel 4 to obtain the cleaned channel 4 electrical activity and
corresponding time values, as well as the number of removed and remaining elements.
e. In the second subplot, plot the cleaned channel 4 data along with the other three channels against time using
the MATLAB default graph colours and dots. Use sprintf() to display the number of removed values and the
number of remaining values in the subplots title (i.e.Cleaned EMG: removed = XXX, remaining
= XXX, where XXX is replaced by the respective values).

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!