Intergrate a array over Tb?
Afficher commentaires plus anciens
If I have x=[0.2 1 0.485 0.13 0.11] , I have Tb=10ms and the fs=16*fb; %Sampling frequency
Ts=1/fs; I would like to integrate the x over Tb. How can I do it without using the integration functions. Using the summing algorithm.
3 commentaires
Walter Roberson
le 4 Avr 2019
Which "summing algorithm" ?
Willim
le 5 Avr 2019
Walter Roberson
le 5 Avr 2019
So you are doing trapz() of the v array at the moment, but you feel it would be more accurate to do plain summation? If so why not just reshape v to have Tb*fs rows and sum along the first dimension ?
What reason do you have to expect plain summation to better represent the area than trapz ?
Réponses (1)
madhan ravi
le 3 Avr 2019
0 votes
Perhaps you want to use cumtrapz() or trapz().
1 commentaire
Willim
le 4 Avr 2019
Catégories
En savoir plus sur Numerical Integration and Differentiation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!