Plot a digital wave

2 views (last 30 days)
Sajith Silva
Sajith Silva on 21 Apr 2015
Commented: Adam on 21 Apr 2015
Can someone help me to plot this digital wave in matlab?
(4/π) ∑ (1/k)sin(2π(kf)t) for k odd
  3 Comments
Sajith Silva
Sajith Silva on 21 Apr 2015
@Adam I've tried with this. But this doesn't give a digital signal
t=0:0.01:3;
f=1;
for k = 1:2:M
xsquare = (4/pi) + (1/k) * sin(2*pi*(k*f)*t);
end
Adam
Adam on 21 Apr 2015
That gives me a digital signal so long as M is defined to something, e.g. 21.

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!