Fourier expansion of dirac delta function
19 views (last 30 days)
Show older comments
Hi,
I am working on moving loads on beams and load is defiend by delta function as:

Sum of the series at x=v0*t must be equal to F0 for every n values. Below is my code that plots F0 and with increasing n value it also increases. I can't find what is wron with my code or isomething is wrong with the formulation?
L=10;
F0=10000;
v0=1;
t=4;
x=-10:0.1:10;
n=4;
f=0;
for i=1:n
wn=i*pi/L;
f=f+2*F0/L*sin(wn*v0*t)*sin(wn*x);
end
plot(x, f);
grid;
0 Comments
Accepted Answer
Paul
on 6 Apr 2022
Increasing n to better approximate the infinte sum yields
L=10;
F0=10000;
v0=1;
t=4;
x=-10:0.1:10;
n=400;
f=0;
for i=1:n
wn=i*pi/L;
f=f+2*F0/L*sin(wn*v0*t)*sin(wn*x);
end
plot(x, f);
grid;
Don't know if that's what's expected.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!