How do I set multiple columns as the same variable?

23 ビュー (過去 30 日間)
Jack Lewis
Jack Lewis 2020 年 12 月 3 日
コメント済み: Jack Lewis 2020 年 12 月 4 日
Hello,
I am currently trying to calulate the power produced using data from 26 seperate points. Each column represents a data collection point with data recorded over a period of 2880 timestamps. At the moment I am assigning each coloum to its own variable using: (UT1 is velocity for turbine 1)
UT1 = xlsread(velocity data.xlsx, 'B3:B2883')
and inputting it into the power equation as shown:
Power= 0.5*rho*A*cp*UT1.^3
This returns the power for each timestamp but only for one column. Is there an easier way to calulate this without having to do every collumn individually? I would then want to collect the overall sum of each column, will I have to do this individually or is there an easier way?
Any help would be much appreciated, thanks.

採用された回答

Alan Stevens
Alan Stevens 2020 年 12 月 3 日
Have you tried
UT = xlsread(velocity data.xlsx, 'A3:X2883');
or whatever, the overall range values are.
Then
Power= 0.5*rho*A*cp*UT.^3;
columnSums = sum(Power);
  1 件のコメント
Jack Lewis
Jack Lewis 2020 年 12 月 4 日
Awesome, Cheers Alan

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by