Prev: Mathematica function to calculate correlation coefficient?
Next: Solving ODE with discontinuous shock perturbation [was: Modification
From: Ruida on 7 Mar 2010 04:05 Hi guys, I expanded an expression which end up with a lot cosine term, such as Cos[w t],Cos[2w t], Cos[3w t].... My question is how to extract coefficient for non-cosine terms? I did my research with Google but couldn't find a solution. Thanks a lot!
From: Christoph Lhotka on 8 Mar 2010 06:22
hello, if I understood right, and you want the non-zero average contributions of a generic Fourier series, try out accordingly: fseries /. Cos[__]|Sin[__]|Exp[__]->0 (delete the cosine terms) will return the non zero average terms. On So, 7.03.2010, 10:04, Ruida wrote: > Hi guys, > > I expanded an expression which end up with a lot cosine term, such as > Cos[w t],Cos[2w t], Cos[3w t].... > > My question is how to extract coefficient for non-cosine terms? > I did my research with Google but couldn't find a solution. > > Thanks a lot! > > > -- Mag. Christoph Lhotka University of Vienna / Institute for Astronomy Tuerkenschanzstrasse 17, A-1180 Vienna, Austria fon. +43 (1) 4277 51841 mail. lhotka(a)astro.univie.ac.at |