How to calculate integral of a square waveform
38 ビュー (過去 30 日間)
古いコメントを表示
Hi,
Could you please let us know how to calculate integral of a square waveform using Matlab
0 件のコメント
採用された回答
Ameer Hamza
2018 年 8 月 10 日
You can use the square() function to create a square wave with the time period of 2*pi and amplitude between -1 and 1. And then use trapz() to evaluate the integral numerically. For example
t = 0:0.1:10; %%choose the range you want
y = square(t);
trapz(t,y)
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!