Plotting a Fourier Sine Series

조회 수: 19 (최근 30일)
Will Jeter
Will Jeter 2021년 3월 4일
답변: Monisha Nalluru 2021년 3월 8일
Need help plotting the following fourier sine series
f(z) = sum((-12/4n+2)(n*pi*z/L))
i think L can be assumed as 1

답변 (1개)

Monisha Nalluru
Monisha Nalluru 2021년 3월 8일
Here is an example plot
z = 1:0.1:10;
n = 10;
ysin = fsin(z,n);
plot(z,ysin),grid
xlabel('x'),ylabel('sin function')
% Define functions
function f = fsin(z,n)
f = 0;
for i = 1:n
f = f + (-12/(4*i +2))*(i*pi*z/1);
end
end
Customize the values of z,x according
Refer to following documentation links:
https://www.mathworks.com/help/symbolic/fourier.html

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by