Equation Implementation in Matlab
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Jes
am 9 Okt. 2014
Beantwortet: Star Strider
am 9 Okt. 2014
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 Kommentar
José-Luis
am 9 Okt. 2014
Please try to read your own question from the perspective of someone who has no idea what you are doing.
Akzeptierte Antwort
Star Strider
am 9 Okt. 2014
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Array and Matrix Mathematics finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!