Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

did i answer this correctly? The variable exEMGNoise is a surface EMG signal. It was sampled at 3000 Hz with a bandwidth of 10 500

did i answer this correctly? The variable exEMGNoise is a surface EMG signal. It was sampled at 3000 Hz with a bandwidth of 10 500 Hz but has had been contaminated by noise that is drowning out the actual signal. Function 1: performs a discrete Fourier analysis on data included by the user in the functions input variables (i.e., when calling the function from another script) gives the user gives the option to plot/not plot the positive frequency spectrum from the result of Fourier analysis. Use the fft function in Matlab to perform the analysis.

function [DFT, freq_domain, specP1]= ... Graham_Assignment3A (Fs, EMG_data, plot_option) %% Graham_AssignmentA % % Carson Graham % % January 30th, 2023 % % Assignment 3 Function 1 %% POTH620 Assignment #3 - Frequency Domain Analysis Q1 % Graham_Assignment3A.m performs a discrete Fourier analysis on data included by the user in the function?s input % variables including the option to plot the positive spectrum results by inputing 1 as plot_option % % Input Arguments % EMG_Data - The EMG data that will be analyzed % Fs - The Frequency Sample % plot_option - Input 1 to diplay results % - Input any other number to not display results % % Output Arguments % DFT - The Results of the discrete fourier analysis % freq_domain - The frequency of the domain % spec_P1 - Positive spectrum amplitude % % Command window inputs % load('exEMGNoise.mat') % [DFT,freq_domain, spec_P1] = Graham_Assignment3A(exEMGNoise, 3000, 1) % %% Discrete Fourier analysis Sig_length = length(exEMG); % Calculates signal length DFT = fft(EMG_Data); % Performs discrete fourier transform % specP2 = abs(DFT/Sig_length) % calculates 2-sided spectrum P2 specP2 % specP1 = specP2(1:L/2+1); specP1(2:end-1) = 2*specP1(2:end-1); % calculates single-sided spectrum specP1 % freq_domain = Fs*(0:(Sig_length/2))/sig_length; % defines frequency domain % subplot(1,3,1); plot(EMG_Data) title('Raw EMG') % subplot(1,3,2);bar(freq_domain,specP1) title('Frequency Spectum') xlabel('frequency (Hz)') ylabel('amplitude (mV)') xlim([0 500]) % zoomed in to show spectral resolution of Fs/L = 3000/12000 = 0.25 Hz. subplot(1,3,3); bar(freq_domain,specP1) title('Zoomed in Spectral Resolution') xlabel('frequency (Hz)') ylabel('amplitude (mV)') xlim([10 13]) end end % end will not compute until function does

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

Students also viewed these Databases questions