Skip to content
Advertisement

Summation of a product of a function and a vector in Sympy

I want to use the following expression in sympy.

sum_{n=0}^{4}A_{n}f(n)

For example I tried this sympy code, but an error has occurred.

JavaScript

How can I manage this? (How to use Symbol’s value as an index of Matrix?)

Advertisement

Answer

You can use symbolic indices with a matrix but you need to use double indices:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement