开发者

Integrate a function using trapz with datetime - Calculate Energy with a current vector

i have a problem with my calculation tool. I have a vector of current values and a time vector in datetime format. Now i need to get the integral for overall Power consumption and im struggling.

I tried to integrate about the vector with trapz but the outcome isn't realistic for this vector. I tested different vectors and signal but same result.

My timevector wasn't used in this example.

%% Power Calculate

Energy = Ch1L1*230;              开发者_C百科  %P=U*I scale vector with 230V
EnergySum = trapz(Energy)/1000     %Output: Power in kW

Does anyone of you know a solution?

I think i misunderstand the time in this outcome. Normally the integral should be the overall Power consumption for the time i logged the data.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜