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. performs a power spectrum density analysis on data included by the user in the functions input variables (i.e., when calling the function from another script) give the user the option to choose from three PSD methods (all three must be included as options) Welch's power spectral density estimate (pwelch function in Matlab). The periodogram power spectral density estimate (periodogram function in Matlab). The power spectrum produced by the pspectrum function in Matlab gives the user gives the option to plot/not plot the PSDF.

function[power,frequency] = Graham_Assignment3B(EMG_data,Fs,opt) %% define variables and run % Graham_Assignment3B.m % % Carson Graham % % January 30th, 2023 % % Assignment 3_ Function 2 %% POTH620 Assignment #3 - Frequency Domain Analysis Q2 % Graham_Assignment3B.m performs power spectrum density analysis with % either the pwelch, periodogram or pspectrum dependent on % user input % Input Arguments % EMG_Data - The EMG data that will be analyzed % Fs - The Frequency Sample % opt - The plot and or graph option corresponding to opt = n = (1...6) % 1 = pwelch + no graph % 2 = pwelch + graph, % 3 = periodogram + no graph % 4 = periodogram + graph, % 5 = pspectrum + no graph % 6 = pspectrum + graph % % Output Arguments % power - Power spectrum density analysis % frequency - The frequency domain % command window inputs %load('exEMGNoise.mat') %[power,frequency] = Graham_Assignment3B(exEMGNoise, 3000, 2) %% Different Plot Options (opt = 1...6) %pwelch if opt == 1 %1 = pwelch + no graph [power,frequency]=pwelch(EMG_Data,[],[],[],Fs); elseif opt == 2 %2 = pwelch + graph [power,frequency]=pwelch(EMG_Data,[],[],[],Fs); bar(frequency,power); title('Pwelch') xlabel('Frequency (Hz)') ylabel('Power') %xlim([0 50]) %periodogram elseif plot_option == 3 %3 = periodogram + no graph [power,frequency] = periodogram(EMG_Data,[],[],Fs); elseif plot_option == 4 %4 = periodogram + graph [power,frequency] = periodogram(EMG_Data,[],[],Fs); bar(frequency,power); title('Periodogram') xlabel('Frequency (Hz)') ylabel('Power') %xlim([0 50]) %pspectrum elseif plot_option == 5 %5 = pspectrum + no graph [power,frequency] = pspectrum(EMG_Data,Fs); elseif plot_option == 6 %6 = pspectrum + graph [power,frequency] = pspectrum(EMG_Data,Fs); bar(frequency,power); title('Pspectrum') xlabel('Frequency (Hz)') ylabel('Power') %xlim([0 50]) end end

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_2

Step: 3

blur-text-image_3

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

Excel 2024 In 7 Days

Authors: Alan Dinkins

1st Edition

B0CJ3X98XK, 979-8861224000

Students also viewed these Databases questions