In the following equation do i perform the sum first or the power of 2 first?
(sum(k.*cos(b)).^2)

 採用された回答

Roger Stafford
Roger Stafford 2015 年 2 月 27 日
編集済み: Roger Stafford 2015 年 2 月 27 日

1 投票

As it stands, the summation occurs first, followed by taking the square of that sum. You should be able to determine that from the parentheses.
In case 'b' is more than a one-dimensional array, there will of course be many sums and the square of each one is taken.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by