How to calculate integral of a square waveform
16 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Ashwini Amin
il 10 Ago 2018
Commentato: Ashwini Amin
il 24 Ago 2018
Hi,
Could you please let us know how to calculate integral of a square waveform using Matlab
0 Commenti
Risposta accettata
Ameer Hamza
il 10 Ago 2018
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)
2 Commenti
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!