How to calculate integral of a square waveform
34 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Ashwini Amin
el 10 de Ag. de 2018
Comentada: Ashwini Amin
el 24 de Ag. de 2018
Hi,
Could you please let us know how to calculate integral of a square waveform using Matlab
0 comentarios
Respuesta aceptada
Ameer Hamza
el 10 de Ag. de 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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Numerical Integration and Differentiation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!