How to integrate imported data with specified limits.
26 vues (au cours des 30 derniers jours)
I am studying switchies losses during swithcing transients of certain devices. I have imported the swithcing data from a different software an uploded it into MATLAB. I am trying to calcuate the area under the curve from the data that has been imported. I have used the Trapz rule and can find out the area under the whole curve, however when I am struggling to apply limits.
I have also looked at the integration Funciton however, I dont know how to run my waveform into a specific function.
I have included the full wavform, and then a section of it, which I wish to calculate the area under.
Jiri Hajek le 5 Oct 2022
If you data is e.g. X,Y, both vectors 1:N, you can create suitable subinterval by assigning Xsub = X(i1:i2), Ysub = Y(i1:i2) and then applying the trapz function on these new data vectors.