combining 2 ECG signal into 1
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
DILINUIER AIERKEN
el 26 de Mayo de 2022
Comentada: Star Strider
el 6 de Jun. de 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 comentarios
Respuesta aceptada
Star Strider
el 26 de Mayo de 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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Matched Filter and Ambiguity Function en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!