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 CenterFile Exchange 中查找有关 Programming 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by