I want to calculate power loss across a resistive load during a 1 ms interval. The experimental setup is such that the voltage and current through the load varies the whole period of 1 ms. I have 10,000 voltage and current values within this 1 ms period. I am exploring the best way to find the power loss in this case. I have tried multiplying each instant's voltage and current (P= vi), and using trapz function in Matlab, I tried to find out the energy loss value (E=trapz(t,P)). However, I want to learn about the better ways to calculate power loss across the load over the 1 ms period.
Thanks.