From: David Cubero on
Hello, i am working in matlab with a matrix containing different values of a signal and i need to delay it to implement a demodulator.
I(1:length(I)-1)

I want to know if this formula will be correct
From: ImageAnalyst on
On Jun 28, 12:34 pm, "David Cubero" <sird...(a)hotmail.com> wrote:
> Hello, i am working in matlab with a matrix containing different values of a signal and i need to delay it to implement a demodulator.
> I(1:length(I)-1)
>
> I want to know if this formula will be correct

--------------------------------
That's not a formula. That just crops off the last element off an
array and returns the cropped array. You need to make a larger array
and then place this whole "I" array into the new, larger array
starting at the position of the delay.
From: Wayne King on
"David Cubero" <sirdivi(a)hotmail.com> wrote in message <i0aitt$2qi$1(a)fred.mathworks.com>...
> Hello, i am working in matlab with a matrix containing different values of a signal and i need to delay it to implement a demodulator.
> I(1:length(I)-1)
>
> I want to know if this formula will be correct

Hi David, This is not delaying a signal, unless I misunderstand what you mean by delaying a signal. If you have a signal you want to delay, how about implementing the delay on the Fourier transform of the signal, and then using the inverse Fourier transform. For example, take a sine wave with a frequency of pi/4 radians per sample and delay it by two samples:

n = 0:95; k = 0:95; delay =2;
x = cos(pi/4*n);
xDFT = fft(x);
phaseshift = exp(-1j*2*pi*k*delay/96);
y = xDFT.*phaseshift;
y = ifft(y,'symmetric');
plot(x,'k');
hold on;
plot(y,'b');
axis([0 95 -1.1 1.1]);


Hope that helps,
Wayne
 | 
Pages: 1
Prev: Clustering Binary data
Next: Callback syntax