how can i implement these difference equations in matlab plz reply me with useful answer ASAP thanks.

1 visualización (últimos 30 días)
1. y[n]=x[n]+1/2x[n-3]
2. y[n]=-4x[n+1]+3x[n-6]-1.5x[n-3]
if x[n]={-1 2 8 4 -5 6} while -5 is at zero .
and i have to solve these equations with zeros and ones commands.

Respuesta aceptada

Image Analyst
Image Analyst el 20 de Sept. de 2014
Hint y[n] = y(n). And x[n-3] = x(n-3). And indexes start at 1, not zero or negative numbers. You can use a simple for loop over n to compute
for n = 4 : length(x)
Need to start at 4 so that x(n-3) doesn't go zero or negative. I don't see why zeros() or ones() function is needed, unless you just want to preallocate space for the y array in advance of the loop.

Más respuestas (0)

Categorías

Más información sobre Programming 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!

Translated by