I'm new to Python programming. Coming from a MATLAB background. I'm looking something similar to symsum function from MATLAB in Python.
I have my array,
a = np.linspace([0,3.14])
I want to sum
sin(2*i*a) where i ranges from 1 to 20
and then plot the results between a and y
I tried the following
y = nsum(lambda i: np.sin(2*i*a), [0,20])
I'm stuck at this point.
Edit. The MATLAB equivalent would be
a = linspace(0,pi)
syms i
y=double(symsum(sin(2*i*a),i,0,20)