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

1 回表示 (過去 30 日間)
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.

採用された回答

Image Analyst
Image Analyst 2014 年 9 月 20 日
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.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by