Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

could anyone tell me how to fix the sum of (n,m) array to a fixed value .

1 visualización (últimos 30 días)
Prabha Kumaresan
Prabha Kumaresan el 25 de En. de 2018
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
could anyone tell me how to fix the sum of (n,m) array to a fixed value .

Respuestas (1)

bon sai
bon sai el 25 de En. de 2018
if [n,m] = size(A), then you can sum by column and then sum by row, or vice visa.
sum(sum(A,1),2)
you will get the same value.
  4 comentarios
Prabha Kumaresan
Prabha Kumaresan el 25 de En. de 2018
Ok.But in randfixedsum, the sum(n+m) of (nxm) array should be equal to s.But for me the sum of array will not be equal to s.In such case how it can be done.
Walter Roberson
Walter Roberson el 25 de En. de 2018
"in randfixedsum, the sum(n+m) of (nxm) array should be equal to s"
I do not understand what you are trying to say there? What I think it says is something that is not correct.

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by