Calculates and Returns the fourier coefficients,'A0', 'An' and 'Bn'
[A0,A,B]=fourier(l,n,f)
half of the period, such that the period is 2L (periodicity of the function f which is to be approximated by Fourier Series)
no. of Fourier Coefficients you want to calculate
function which is to be approximated by Fourier Series, make sure that the function is defined in the interval [-l,l]
The first fourier coefficient.
An array/matrix whose nth element is the nth coefficient An.
An array/matrix whose nth element is the nth coefficient Bn.
Calculates and Returns the fourier coefficients,'A0', 'An' and 'Bn'.
deff('a=f(x)','a=x'); [a,A,B]=fourier(2,5,f) | ![]() | ![]() |