- #1
frenzal_dude
- 77
- 0
Hi, I've got a square wave: x = square(2*pi*10*t);
with time vector: t=0:0.001:2;
I've also got a random noise signal: r=randn(1,10000);
I want to add the noise signal to the square wave, but I can't add them because they aren't of the same dimensions. I know I can use awgn(x,snr) but I want to use my r function instead if it's possible.
How can I make the noise signal a function of the time vector?
Thanks in advance.
David
with time vector: t=0:0.001:2;
I've also got a random noise signal: r=randn(1,10000);
I want to add the noise signal to the square wave, but I can't add them because they aren't of the same dimensions. I know I can use awgn(x,snr) but I want to use my r function instead if it's possible.
How can I make the noise signal a function of the time vector?
Thanks in advance.
David