Square Wave from Sine Waves
3 ビュー (過去 30 日間)
古いコメントを表示
Hello.
How would I make a square wave using a summation of sinusoidal signals as shown in the image below;
Thank you,
Andy.
3 件のコメント
採用された回答
VBBV
2021 年 4 月 6 日
%f true
f = 0.5;
vp = 2;
N = 8;
t = 0:0.01:2;
for k = 1: length(t)
for i = 1:N
K(i,k) = (1/(2*i-1))*(vp*sin(2*pi*(2*i-1)*f*t(k)));
end
KK(k)= (4/pi)*sum(K(:,k));
end
plot(t,KK)
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!