I have taken a trace of an ECG sampled at 360HZ. from the following website:
http://www.physionet.org/physiobank/database/mitdb/

I have to contaminate it with an artificial 50Hz sinusoid.

I am working on MATLAB. I imported the .dat file got from the website to the Signal Processing tool in MATLAB. I have also created the 50Hz signal by the following:

x=0:0.001:0.05
y=sin(2*pi*50*x)

Now, I am unable to add the two signals together. Please help and advise how to do this. I am doing this so that I can test a filter I prepared.

Thank you.


x=0:0.001:0.05
y=sin(2*pi*50*x)

Now, I am unable to add the two signals together. Please help and advise how to do this. I am doing this so that I can test a filter I prepared.

Thank you.

Its been awhile since ive messed with matlab but it looks like you want to add an array with just a single function...

this isnt possible unless you do array arithmetic... I am not so sure how you add... is it .+ or +. or something... the . with division and with mulitplication changes it to array division/multi not sure if it works with addition...

I'll break out the book later and look if this doesnt help

I remember someone having a similiar problem and it was because they were confusing text subscripts and numeric subscripts.

Probably an array issue though :)