Plots the fourier series approximation of hte given periodic function and also 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
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.
Plots the fourier series approximation of hte given periodic function and also returns the fourier coefficients,'A0', 'An' and 'Bn'
deff('a=f(x)','a=x'); [A0,A,B]=fourierplot(2,100,f) | ![]() | ![]() |