Amplitude of square wave

6 ビュー (過去 30 日間)
Namira
Namira 2019 年 2 月 13 日
コメント済み: Namira 2019 年 2 月 13 日
I am using a sine wave
a = A sin(2*pi*f*t)
where A = 2.
I made a square wave by adding the odd harmonics of sine wave.
b = A sin(2*pi*f*t) + A sin( 3 * 2*pi*f*t)/3 + A sin(5* 2*pi*f*t)/5 + A sin(7* 2*pi*f*t)/7 +......
When the square wave is created the amplitude of the square wave will not be the same as the sine wave. What will be the coefficient for the amplitude of the square wave?

採用された回答

KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 2 月 13 日
編集済み: KALYAN ACHARJYA 2019 年 2 月 13 日
What I have seen that, you b is look like as following-
A=2; f=3;
t=0:.01:10;
a=A*sin(2*pi*f*t);
%figure, plot(t,a);
b=A*sin(2*pi*f*t) + A*sin(3*2*pi*f*t)/3+A*sin(5*2*pi*f*t)/5+A*sin(7*2*pi*f*t)/7;
%[pks,locs]=findpeaks(b);
%findpeaks(b)
plot(t,b);
Why donot go for peak analysis? Visit here and read here
  1 件のコメント
Namira
Namira 2019 年 2 月 13 日
Thanks.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDescriptive Statistics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by