[sympy] Sympy unable to plot Fourier series, bug

2021-04-23 Thread Areeb Sherjil
Hi all, I hope everyone is enjoying themselves! I am trying to compute the Fourier series of a simple signal(1 Volt square with freq of 1hz and 0.5T pulse width). This is what I need help with: 1- How can I make sympy display the results of the sigma summation as : Ao+An1+An2+An3... etc in

[sympy] How to convert erf to decimal and compute normal distribution

2021-04-26 Thread Areeb Sherjil
Hi everyone, I am trying to compute the normal distribution of a function. So I need to integrate from 'a' to 'b' and get a decimal answer that would be the probability. When I integrate I get erf; how do I convert to decimal?[image: Formula.png] This is my code: import sympy as syms from sympy

[sympy] Re: How to convert erf to decimal and compute normal distribution

2021-04-27 Thread Areeb Sherjil
Thanks Kalevi, Its sorted now On Tuesday, April 27, 2021 at 2:10:22 PM UTC+1 jks...@gmail.com wrote: > evalf is a function. You have to give the precision as an argument: > > >>> Prob.evalf(4) > 0.7333 > >>> Prob.evalf(10) > 0.7333134908 > > Kalevi Suominen > > On Monday, April 26, 2021 at 7:56:3

[sympy] Re: Sympy unable to plot Fourier series, bug

2021-05-05 Thread Areeb Sherjil
.integrate(V*syms.cos(w*n*t),(t,0,T/2)) Bn= (w/syms.pi)*syms.integrate(V*syms.sin(w*n*t),(t,0,T/2)) f= Ao/2 +syms.Sum(An*syms.cos(n*w*t),(n,1,5))+ syms.Sum(Bn*syms.sin(n*w*t),(n,1,5)) f syms.plot(f,(t,0,2*T)) On Friday, April 23, 2021 at 4:09:20 PM UTC+1 Areeb Sherjil wrote: > Hi all, >

Re: [sympy] Re: Sympy unable to plot Fourier series, bug

2021-05-05 Thread Areeb Sherjil
n(w*n*t),(t,0,T/2)) > f= Ao/2 +syms.Sum(An*syms.cos(n*w*t),(n,1,5))+ > syms.Sum(Bn*syms.sin(n*w*t),(n,1,5)) > f > > At this point, the expression f looks like can be simplified. Then: > > syms.plot(f.simplify(), (t, 0, 4*T)) > > Davide. > > > Il giorno mer 5 mag

Re: [sympy] Re: Sympy unable to plot Fourier series, bug

2021-05-05 Thread Areeb Sherjil
Oh no sorry, I used %matplotlib tk at the start and now it opens the graph in separate window.(Google groups does not allow to edit messages ) But how to expand the summation series? On Wednesday, May 5, 2021 at 1:52:16 PM UTC+1 Areeb Sherjil wrote: > Respond to Davide > > Hi, >

Re: [sympy] Re: Sympy unable to plot Fourier series, bug

2021-05-05 Thread Areeb Sherjil
Thanks Davide! It works now On Wednesday, May 5, 2021 at 2:02:48 PM UTC+1 sandona...@gmail.com wrote: > Use the doit() method, something like the following: f.doit() > > Davide. > > > Il giorno mer 5 mag 2021 alle ore 14:58 Areeb Sherjil > ha scritto: > >> Oh n