Equation Implementation in Matlab

1 次查看(过去 30 天)
I have a vector X of 200*1 w=[1 2 3 4 5]
up(n)=summation(k=1to5) w* X(n-k)
Explanation for n=1, X should take previous five samples, X(200),X(199)...X(196) and iiy for n=2 and goes on
  1 个评论
José-Luis
José-Luis 2014-10-9
Please try to read your own question from the perspective of someone who has no idea what you are doing.

请先登录,再进行评论。

采纳的回答

Star Strider
Star Strider 2014-10-9
I am not certain if a matrix-vector product or convolution/filter is what you are doing.
Does this do what you want:
X = randi(50, 200, 1);
w=[1 2 3 4 5];
Xr = reshape(X, [], 5);
up = Xr*w';
It creates ‘up’ as a (40x1) vector.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Array and Matrix Mathematics 的更多信息

标签

尚未输入任何标签。

Community Treasure Hunt

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

Start Hunting!

Translated by