combining 2 ECG signal into 1
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
DILINUIER AIERKEN
le 26 Mai 2022
Commenté : Star Strider
le 6 Juin 2022
I'm tring to merg 2 ECG signal into one (with same sampling rate), however, at the merging point, there is some error. I can't figure it out. could someone please help, appreciated. my code and the figure are attached.
clear all
close all
dataaf=load("AF2.mat"); % AF signal
xaf=dataaf.val(1,:);
xaf=detrend(xaf)';
datan=load("normal2.mat"); % Normal
xn=datan.val(1,:);
xn=detrend(xn)';
%xnr=resample(xn,250,128); % resample raw signal
xc=[xn;xaf];
Fs = 128;
t = (0:length(xc)-1)/Fs; %time value of any sample = [sample no./Fs]
plot(t,xc)
xlabel('Time [s]')
% hold on
pause
0 commentaires
Réponse acceptée
Star Strider
le 26 Mai 2022
Unless the row vectors ‘xn’ and ‘xaf’ have the same number of elements, the vertical concatenation to produce ‘xc’ is going to fail:
xc=[xn;xaf];
Horizontrally concatenating them (note the substitution of the comma for the semicolon) however will work:
xc=[xn,xaf];
.
4 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Matched Filter and Ambiguity Function dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!