use for loop to write a sum function to achieve halfsum

 Respuesta aceptada

Hi,
note the triu function:
A = [1 2 3; 4 5 6; 7 8 9]
result = sum(triu(A),'all')
Best regards
Stephan

Más respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 28 de En. de 2019

Respondida:

el 28 de En. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by