Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

BME558:  Introduction to Brain-Machine Interfaces

Homework 3

As a neural engineer, you have been assigned with the task of using EEG signals to control a computer cursor up, down, left, and right. Your first step is to create MATLAB code to simulate and decode neural data for the purpose of later processing real neural data. See the code “sample_sine_wave.m” we looked at in class for an example of how to create and plot a single sine  wave.

1)   Create source signals #1 through #4:

Show your code to create four variables in MATLAB (recording length = 5 sec; sampling frequency = 1kHz) that are four different sine waves:

i.   Wave #1: Frequency = 5 Hz; Amplitude = 0.5 mV;

ii.   Wave #2: Frequency = 5 Hz; Amplitude = 0.3 mV;

iii.   Wave #3: Frequency = 5 Hz; Amplitude = 0.2 mV;

iv.   Wave #4: Frequency = 5 Hz; Amplitude = 0.1 mV;

2)   Plot each wave as a function of time on the same plot. Include a screenshot of the plot.

3)   Create source signal #5:

Show your code to create a variable in MATLAB (recording length = 5 sec; sampling frequency = 1kHz) that is the sum of four different sine waves:

i.   Wave #1: Frequency = 5 Hz; Amplitude = 0.5 mV;

ii.   Wave #2: Frequency = 10 Hz; Amplitude = 0.5 mV;

iii.   Wave #3: Frequency = 30 Hz; Amplitude = 0.5 mV;

iv.   Wave #4: Frequency = 50 Hz; Amplitude = 0.5 mV;

4)   Plot the combined wave as a function of time. Include a screenshot of the plot.

Bonus

5)   Create a chirp signal with an initial frequency of 5 Hz and a final frequency of 50 Hz (recording  length = 5 sec; sampling frequency = 1kHz). Plot the waveform. Show the frequency content as a function of time by creating a spectrogram. Hint: refer to “Matlab for Neuroscientists” for ideas.

Please submit your HW in Canvas under Assignments” or by email togmcconne@stevens.edu