フィルターのクリア

Summing parts of an array??

52 ビュー (過去 30 日間)
Kevin
Kevin 2014 年 7 月 29 日
回答済み: Azzi Abdelmalek 2014 年 7 月 29 日
I have the following lines of code:
D=(8./(TSR.*9)).*(F.*(sin(relative_wind).^2).*(cos(relative_wind)-((TSR_local).*(sin(relative_wind)))).*(sin(relative_wind)+((TSR_local).*(cos(relative_wind)))).*(1-(Cd./Cl).*cot(relative_wind)).*(TSR_local.^2));
Cp=sum(D);
D is a 9x1 array. However I only want to sum the first 8 values in the array. Could anybody please show me how to do this as my current code is summing all 9 values?

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 7 月 29 日

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by