-
Notifications
You must be signed in to change notification settings - Fork 11
/
example_01.m
56 lines (48 loc) · 2.18 KB
/
example_01.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
%% Example 01
% This example shows the use of the GUI to explore Amplitude Modulation
% for ECG data and EEG data
%
% The 'explore_strfft_ama_gui()' computes the Modulation Spectrogram.
% It uses the Short Time Real Fourier Fast Transform (STRFFT) to compute
% the Spectrogram, after rFFT is used to obtain the Modulation Spectrogram
%
% The 'explore_wavelet_ama_gui()' computes the Modulation Spectrogram using
% It uses the Wavelet transform with Complex Morlet wavelet to compute
% the Spectrogram, after rFFT is used to obtain the Modulation Spectrogram
%
% Usage for explore_*_ama_gui()
%
% Once the GUI is executed, it accepts the following commands
%
% Key Action
% Up Arrow Previous channel (-1 channel)
% Down Arrow Next channel (+1 channel)
% Left Arrow Go back to the previous segment (-1 segment shift)
% Right Arrow Advance to the next segment (+1 segment shift)
% 'W' Previous channel (-5 channels)
% 'S' Next channel (+5 channel)
% 'A' Go back to the previous segment (-5 segment shift)
% 'D' Advance to the next segment (+5 segment shift)
%
% 'U' Menu to update:
% parameters for Modulation Spectrogram
% ranges for conventional and modulation frequency axes
% ranges for power in Spectrogram and Modulation Spectrogram
% ESC Close the GUI
%
%% ECG data (1 channel) using STFFT-based Modulation Spectrogram
load('./example_data/ecg_data.mat');
% STFFT Modulation Spectrogram
explore_stfft_ama_gui(x, fs, 'ECG', 'jet');
%% ECG data (1 channel) using wavelet-based Modulation Spectrogram
load('./example_data/ecg_data.mat');
% Wavelet Modulation Spectrogram
explore_wavelet_ama_gui(x, fs, 'ECG');
%% EEG data (7 channels) using STFFT-based Modulation Spectrogram
load('./example_data/eeg_data.mat');
% STFFT Modulation Spectrogram
explore_stfft_ama_gui(x, fs, ch_names);
%% EEG data (7 channels) using wavelet-based Modulation Spectrogram
load('./example_data/eeg_data.mat');
% Wavelet Modulation Spectrogram
explore_wavelet_ama_gui(x, fs, ch_names);