MATLAB: How can i write the code in a m-file that can take any periodic function and calculate its fourier series expantion using matlab fourier seriressinx for example f(x)=sin(x) Best Answer Download this FEX submission:https://www.mathworks.com/matlabcentral/fileexchange/31013-simple-real-fourier-series-approximation Related SolutionsMATLAB: Fourier Check out this resource from Steve Eddins: http://blogs.mathworks.com/steve/category/fourier-transforms/ MATLAB: Fourier Series for a Periodic Function display('Problem 1_Example_17.1')ao=1/4;N = 100000;Wo = pi;t = -1:.001:11;f = zeros(1,length(t)); n =linspace(1,2,length(t)); bn = (-1).^n+1;an=1./((n.^2).*(pi^2)).*((1-(-1).^n)); f = f + an.*cos(Wo*n.*t) + bn.*sin(Wo*n.*t); % Plotting and plot formatting is done hereplot(t,f);grid on;title(['Fourier Series Representation w/ ' num2str(N) ' Terms'],'FontSize',16)xlabel('Time');ylabel('Function Value');axis tight;Is this? Related QuestionSymbolic expantion in matlabPlots periodics functions and fourier transform
Best Answer