sum of squared elements in a matrix

20 visualizaciones (últimos 30 días)
Brian
Brian el 11 de Nov. de 2014
Comentada: Azzi Abdelmalek el 20 de Nov. de 2014
I tried using the sumsqr to sum squares of each element in a matrix I don't think I understand the syntax. I tried putting the matrix I into the command sumsqr(I), but I got the answer "1.3056e+010" and I don't know how to interpret this answer.
  1 comentario
Mikhail
Mikhail el 11 de Nov. de 2014
This is exponential format. You can print your variable in "normal" format with fprintf

Iniciar sesión para comentar.

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 11 de Nov. de 2014
1.3056e+010 is 1.3056 * 10^10
  2 comentarios
Brian
Brian el 20 de Nov. de 2014
After modifying my code, I have a different answer. 7.4407e+006 Is this 7.4407*10^6 ?
Azzi Abdelmalek
Azzi Abdelmalek el 20 de Nov. de 2014
Yes

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by