ECG signal input to simulink.

Hi,
How to perform dwt on ECG signal in simulink? I have loaded the .mat file from physionet into my matlab workapsce and tried loading that in simulink mdel but that doesn't work. I also tried loading data from a text document and then giving it as input in simulink model. Still it doesn't work.
I have referred mathwork documentation regarding loading data from workspace into simulink and tried everything but nothing seems to work. ANyone who has worked on this kindly help me with the exact process.
Thanks in advance!

Answers (1)

Pavan Guntha
Pavan Guntha on 26 Mar 2021
You can use from workspace block or from file block to load the data present in MATLAB workspace into Simulink. The following block diagram illustrates the flow to compute Discrete Wavelet Transform:
You can refer to the documentation of DWT and dyadic analysis filter bank for more details. The buffer block is required to control the frame rate as required by the DWT based on number of levels. The following plot is the output by setting Filter to Daubechies, Wavelet order as 2 and number of levels as 1 for one of the ECG datasets in PhysioNet.

7 Comments

Thank you for reverting. Kindly provide the file of the block diagram so I can see the settings required for the different blocks.
Also, if you could please provide the ECG file you have used .
Hi Fatema,
Both the simulink file and ECG dataset are attached for your reference.
Hope this helps!
Thank you!!
I will try at my end and get back to you in case of any further queries.
I have one doubt, do we just need to load the .mat file and give it as input to the simulink model or any modification need to be performed before giving it to the simulink model?
I am using matlab 2020a and getting error while opening the model. Seems to be issue with the version of matlab. I am attaching the error screenshot. Kindly help me with this.
Hi Fatema,
The compatible simulink file is attached. You can load the .mat file into a variable and use the from workspace block or from file block to load into Simulink model.
Hope this helps!
Thank you!!
I had another query. In the buffer block as you said output depends on number of levels of DWT. I need to perform 10 level dwt using db6 wavelet, so, for that my buffer output should be 10 right?

Sign in to comment.

Categories

Find more on Discrete Multiresolution Analysis in Help Center and File Exchange

Asked:

on 16 Mar 2021

Commented:

on 8 Apr 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!