function for sum of each two next values

2 ビュー (過去 30 日間)
Lu Da Silva
Lu Da Silva 2020 年 10 月 5 日
編集済み: KSSV 2020 年 10 月 5 日
I have a vector v0 (velocity) and for each velocity I have a value of power (P) that the wind turbine produces at that wind speed (so I have a corresponding vector for P).
Now I need to calculate the Annual Energy Output (AEO) using the formula below but I'm not sure how to implement that in MATLAB
k = 2;
A = 9;
f = exp(-(??/A)^k) - exp(-(??/A)^k);
H = 8760 * f;
AEO = ?? * H;
I assume a for-loop is needed?
Thank you in advance!

採用された回答

KSSV
KSSV 2020 年 10 月 5 日
編集済み: KSSV 2020 年 10 月 5 日
Let V and p be your arrays of velcoity and power.
k = 2;
A = 9;
f = exp(-(v(1:end-1)/A).^k) - exp(-(v(2:end)/A).^k);
H = 8760 * f;
AEO = 1/2*(p(1:end-1)+p(2:end)) .* H;
  2 件のコメント
Lu Da Silva
Lu Da Silva 2020 年 10 月 5 日
I get the error "The end operator must be used within an array index expression."
How do I insert the capital sigma that stands for the sum of the AEO values?
Thanks again!
KSSV
KSSV 2020 年 10 月 5 日
編集済み: KSSV 2020 年 10 月 5 日
Read about sum, cumsum.
I am not getting any error. Show us the complete code you tried.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWind Power についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by