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

1 visualizzazione (ultimi 30 giorni)
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.

Risposta accettata

Image Analyst
Image Analyst il 20 Set 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.

Più risposte (0)

Categorie

Scopri di più su Programming in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by