Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Flash XML Applications Use AS2 And AS3 To Create Photo Galleries Menus And Databases

Authors: Joachim Schnier

1st Edition

0240809173, 978-0240809175

More Books

Students also viewed these Databases questions

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago