How can i plot this function in matlab
1 view (last 30 days)
Show older comments
this is a fourier transform function and how can i make it in matlab
0 Comments
Answers (1)
David Hill
on 26 Feb 2020
You could do something like this:
p=1:2:100000;
A=1;
T=2;
f=@(t)A/2 +2*A/pi*sum(sin(p*2*pi*t/T)./p);
t=0:.1:2;
for k=1:length(t)
F(k)=f(t(k));
end
plot(t,F);
I assume A and T are scalar.
2 Comments
See Also
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!