Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
could anyone tell me how to fix the sum of (n,m) array to a fixed value .
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
could anyone tell me how to fix the sum of (n,m) array to a fixed value .
Antworten (1)
bon sai
am 25 Jan. 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 Kommentare
Walter Roberson
am 25 Jan. 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.
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!