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

1 Ansicht (letzte 30 Tage)
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.

Akzeptierte Antwort

Image Analyst
Image Analyst am 20 Sep. 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.

Weitere Antworten (0)

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by