Borrar filtros
Borrar filtros

How do calculate the summation of every row in the given table?

42 visualizaciones (últimos 30 días)
ahmed obaid
ahmed obaid el 19 de Ag. de 2017
Respondida: KL el 19 de Ag. de 2017
Dear Experiences
i have a table that look like the following:
Table:
Name RC BV CC RQ CY ..... TY
A1 1 0 1 0 1 0
A2 1 0 0 0 0 0
A3 0 1 1 0 1 0
A4 0 0 0 0 0 1
then the Result of applying such operation look like the following:
Name RC BV CC RQ CY ..... TY Sum
A1 1 0 1 0 1 0 2
A2 1 0 0 0 0 0 1
A3 0 1 1 0 1 0 3
A4 0 0 0 0 0 1 1
where the Sum column involve the summation of every independent row,
thanks for any help.

Respuesta aceptada

KL
KL el 19 de Ag. de 2017
yourTable.Sum = sum(yourTable{:,2:end},2);

Más respuestas (0)

Categorías

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

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by