Can matlab obtain PSD values of systolic and diastolic segments that are plotted?
5 views (last 30 days)
Show older comments
I have a code that loads a data file called 'pec1.dat' and then plots the three signals in seprate graphs. My question is, from those segmented signals would I be able to select the systolic and diastolic segments and obtain each PSD value?
NOTE: I had to upload 'pec1.dat' as a .txt file so I would be able to upload it along with the problem since MATHWORKS would not allow me to attach a .dat file.
Here is my code
close all
clear all
clc
% Load the PCG, ECG, and carotid pulse data
% Sampling frequency is fs = 1000 Hz
sig = load('pec1.dat');
fs = 1000;
% Separating PCG, ECG, and carotid signals
pcg = sig(:,1);
ecg = sig(:,2);
carotid = sig(:,3);
clear sig;
% Plot all signals
N = length(pcg);
T = 1/fs;
t = [0 : (N - 1)] * T;
clear N T;
figure;
subplot(3,1,1);
plot(t, pcg);
ylabel('PCG');
title('PCG, ECG, and carotid pulse signals');
axis tight;
subplot(3,1,2);
plot(t, ecg);
ylabel('ECG');
axis tight;
subplot(3,1,3);
plot(t, carotid);
ylabel('Carotid pulse');
xlabel('Time in seconds');
axis tight;
0 Comments
Answers (1)
Sai Kiran
on 25 Apr 2023
Hi,
As per my understanding you want to calculate the PSD of systolic and diastolic signals from the above data.
You can use the PCG data for further analysis as it is a recording of the mechanical sounds produced by the heart as it beats which gives the true picture of systolic and diastolic events.
Please refer to the following article for more information.
I hope it helps!
Thanks.
0 Comments
See Also
Categories
Find more on Get Started with Signal Processing Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!