How to get energy using power summation equation in MATLAB?

10 views (last 30 days)
How to get energy using this equation in MATLAB? I tried but it says problems about Matrix dimensions. n=1:1140, and P is the same number of set of data and t is also t=1:1140?
  2 Comments
Torsten
Torsten on 16 May 2022
Edited: Torsten on 16 May 2022
What is t_0 ?
As you can see from the formula, the t vector must have 1 element more than the P vector.

Sign in to comment.

Accepted Answer

Torsten
Torsten on 16 May 2022
Edited: Torsten on 16 May 2022
t = [0 t];
E = sum(P.*diff(t))

More Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Products


Release

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!