How to get a sum of a series
Mostrar comentarios más antiguos
Hello,
I need to get the sum of
Y(t)= A(i)*X(t-i)
where X is a vector of size (100,1). A is a vector of size (3,1)
i=0 to 2 and t= 3 to 100.
Any help is greatly appreciated.
Thanks
Dav
Respuesta aceptada
Más respuestas (2)
Muruganandham Subramanian
el 20 de Feb. de 2014
2 votos
Try using 'cumsum' command
David Young
el 20 de Feb. de 2014
Editada: David Young
el 20 de Feb. de 2014
If you want the sum over i for each t, then it's
Y = conv(X, A, 'valid');
Categorías
Más información sobre Mathematics and Optimization en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!