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

 Respuesta aceptada

Roger Stafford
Roger Stafford el 27 de Feb. de 2015
Editada: Roger Stafford el 27 de Feb. de 2015

1 voto

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.

Más respuestas (0)

Categorías

Más información sobre MATLAB en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 27 de Feb. de 2015

Editada:

el 27 de Feb. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by